Several critical bugfixes.

- Use /dev/null for jobs' output. (Otherwise, jobs that try to write
  any output die because there was no stdout/stderr.)

- include <stdlib.h> for strtoull, otherwise gcc silently defaults to an
  implicity int (32-bit) rather than 64-bit return value, truncating the
  top 32 bits. D'oh!

- A number of other fixes.