Add Mongo index functions and database version functions with tests.

Note: No unit tests for the Mongo index functions since they have side effects.