Minor cleanup
Add support for partitioners for parallel_for and parallel_reduce

This replaces the "grain" parameter on these functions and allows
for more advanced partitioning schemes.
Strip trailing spaces
Normalize code layout