Add Percentiles.Result type to contain results from percentile computations

The existing type signatures were getting ridiculous and not-particularly self-explanatory,
and we wanted to add a count to the result, so having a separate type for it seemed
like the obvious thing to do.
Merge pull request #9 from spotify/percentile-type

Add Percentiles.Result type to contain results from percentile computations
DoFns.detach(...), to explicitly prevent Avro object reuse in reducers

When writing DoFns operating on PGroupedTables, you operate on an Iterable of your
value type. In some serialization formats (such as Avro), this will actually give
you the same object multiple times with different data, which breaks if you want
to add all the objects to a collection and output that without explicitly cloning
all the records.

This patch adds a DoFns.detach(MapFn, PType) method which wraps a DoFn so that
it is passed an Iterable of 'detached' objects created by calling getDetachedValue
on the provided PType and incoming object. The PType will be initialized in the
MapFn's initialize step, so you can just pass in PTypes obtained directly from
Avros or PTypeFamilys