Enhance task/affinity auto binding to consider tasks * cpus-per-task.

BUG #1149