CDK-488: Add TaskUtil.partition.

This utility method regroups a PCollection using a specified number of
reducers. This can be used to control the number of files created by a
copy job. The number of reducers is approximately the number of files
produced, but at least one file per partition will be created.

This is implemented in two ways. If the dataset is partitioned, the
entities are grouped by partition key so that each partition is handled
by one reducer and the number of files created is minimized. If the
dataset is not partitioned, this will perform the regroup operation
using the entities themselves as keys to produce the right number of
files, one per reduce task.
This change is about controlling the number of writers that are used, so we need to have tests for that behaviour included as a part of this work (by checking the actual number of files written as I mentioned above), otherwise we don't know if it works or, more importantly, if it stops working sometime down the line.

Later versions of local job runner support >1 reducer (https://issues.apache.org/jira/browse/MAPREDUCE-434), so perhaps we could bump to Hadoop 2.3.0 and only run these tests in the default (Hadoop 2) profile? What was the problem with MiniMRCluster BTW?