Add Mongo index functions and database version functions with tests.