FB31844 Close window where documents may miss being indexed

This PR fixes a problem where an index can mistakenly think that it's up to date with indexing when it is in fact not.

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.

The PR also adds a `shutdown` method to CDTIndexManager. I'd like to understand whether the content of this method is enough -- for example, need I shut a db connection? Anything else?