Fix memory leak

Requires priority/multifactor plugin with multiple partitions per job
check for job priority overflow

Also check for priority of zero in jobs submitted to multiple
partitions (priority zero means held, so set the priority to 1).