reportage: bucket chaining beta
reportage: bucket chaining beta

Usage:
Loan.all(:id.lte => 100).group_by(:branch_id).group_by(:center_id)

The function is currently called 'group_by', and not 'bucket_by'. This
is particularly because I have changed the bucketing semantics a bit:

- buckets are now DataMapper::Collection object, instead of just being
  a collection of ids. DataMapper::Collection is lazily evaluated, and
  makes it easy to chain queries.

- doesn't bucket on a range (see bucket_by)

Note: The interface is likely to change a little.

Mostfit/mostfit,svs/mostfit-private,svs/mostfit-private,Mostfit/mostfit