base/workers.c: fix return code of wproc_run_job()

In case of errors, write(2) may return 0, which is interpreted as OK
in the caller.

While at it, increase jobs_running and jobs_started on worker process
only if write succeded and do similarly for the loadctl struct.

Original-patch-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>