database: wrap mongoc_client_command() from mongoc_database_t.
tests: release cursor when we have finished with it.