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.