Improve static load balancing in @parallel

Ensure that static load balancing is as good as possible: each worker
process gets either M or M+1 elements of the input range.

Also fix a bug in preduce() which could cause a bounds exception when
the length of the input range was smaller than the number of workers.
Test @parallel load balancing and reduction for small ranges
Merge pull request #3339 from c42f/cjf/parfix

RFC: Improve static load balancing in @parallel