Fixed a bug in the previous commit’s unit test
Add “_local_seq” property to doc passed to map block

Its value is the sequence number of the revision. The map function can
emit this as the key (or part of the key) to sort the index chronologically
like a _changes feed.