TRQ-1868. Fix a deadlock in array submissions. Also, perform some other general cleanup around job array submission.
Merge branch 'master' of https://github.com/adaptivecomputing/torque