Reduce support

In order to support a few chained map reduce as outlined in this package: https://github.com/ryanramage/map-reduce-chained

Here is a summary of the changes offered:

  - ability to pass in reducer function, and initial value
  - revert back to emitting the key, and value that user has provided to keep reduced values
  - get the original id for the second lookup from the end element of the key array
  - allow passing through options to createIndexedStream via getBy function
  - on setup return the db if already configured to support chaining