Refactor job pkg, adding tests; serialize JobPayload as JSON into etcd