[gh-15] Fix bad bug where jobs were silently marked failed and the the serialized JQJob was corrupted when JQJob de-serialization failed.

- Also fix a bug which caused the job field to be double-serialized.
- Add tests.