key/value generators yield dictionaries not tuples

reducer streams now yield a (key, key_stream) tuple instead of simply a
key_stream. similarly, key_steams now only return the values
corresponding to key, as opposed to (key, value) tuples.

keys and values are now converted to dictionaries prior to being
yielded, so lists of key/value names need to be provided to
reducer_stream.

also changed all of the reducers to work with this new design
renamed variables corpora --> corpus

was using corpora instead of corpus in variable names, renamed them to
be more clear and correct.
refactored mappers/reducers for easier testing

placed each mapper and reducer in its own function to aid in testing.
these functions also support alternate input sources for easier testing.

these functions are invoked when in __main__, so they still work with
the map-reduce streaming framework.