enforce cpus-per-task with mem-per-cpu option

Properly enforce a job's cpus-per-task option when a job's allocation is
constrained on some nodes by the mem-per-cpu option.
bug 590