(#14) fix ordering in case of multiple emits

When the same doc emits the same key with different values,
CouchDB sorts by [key, docid, value].  Now we do the same.
(#15) - handle NaN/Inf/dates

Ensures that PouchDB mimics CouchDB's
behavior for mapreduce keys containing
NaN, Infinity, -Infinity, and dates.