Document job states.
Fix, cleanup and document qstat parsing.