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.
FMDB fix: Better error handling in FMResultSet
Better validation of “_id”, “_rev”, “_deleted”, “_attachments” properties
Fixed spurious CBLDocumentChange.inConflict value

When a previously nonexistent document is created via a pull replication,
the inConflict flag was mistakenly getting set (because technically a new
branch of the document is being created; it just happens to be the first
one.)
Fixes #243
Fixed another spurious CBLDocumentChange.inConflict value

The logic for setting inConflict in -forceInsert:… was broken. It needs
to check whether the local revision it's going to add a child of is
currently a leaf or not.
Fixes #243.
Return 501, not 404, on JS view query if view-compiler isn’t installed
Merge remote-tracking branch 'upstream/master'