Adjust chpl_task_maxPar() to take maxThreads into account.

For fifo and massivethreads tasking, the chpl_task_getMaxPar() function
wasn't taking into account any limitation on the number of threads.  Now
it does.
I'm not a huge fan of max2 as the variable name. Maybe taskingMax, or taskingLimit or something along those lines? Or maybe rename max to numCores, and use max for max2

And I think it would read cleaner to put the the definition of max2 (or whatever the new name if you change it) on the line below "max = blah" instead of in the condition.