Abstract workers to allow different implementations

Currently only new processes spawned by `pcntl_exec` are supported. This PR adds a `WorkerInterface` and moves the existing functionality into `PcntlWorker`.