kill-worker-process-by-worker-id: simplified specific Meadow code by moving general checks out of them