Don't crash on error when nil is passed as error parameter
Fix a compilation error in Xcode 6
Fix sequenceNumber property on TD_Database
Make sure updateIndexes uses only correctly registered indexes

Previously, if an index had been registered in a previous session,
the index manager would try to update it even though an indexing
function hadn't yet been registered this session. This would result
in indexing nil values for any documents updated or added during
the period between the index manager being created and ensureIndexed
being called, but the index thinking it had successfully updated
itself.

This fixes FB31844.
Merge pull request #34 from cloudant/31844-miss-indexing-docs

FB31844 Close window where documents may miss being indexed
Add tests for CDTDatastoreChangeNotification event firing

This event should be fired for create, update and delete. It can be
on a specific datastore, or globally.

This also fixes a bug where updates didn't fire an event.
Document datastore events in docs/events.md