(daleharvey/pouchdb#1658) - add indexable string

Following daleharvey/pouchdb#1658 and
pouchdb/mapreduce#12, this adds the
toIndexableString method, which allows us
to emulate CouchDB's standard collation
to a reasonable degree of fidelity (e.g. no
ICU ordering for strings).