Fixes several failing mongo driver tests

Some mongodb tests were failing because the test suite was not
cleaning up the database in between runs. In the course of
fixing this bug, the tests in question were also DRY'd up between
the sqla and mongo drivers.

NOTE: This patch is a prerequisite for enabling mongo in the gate.
Change-Id: Iaa2a1cbd6a27c53a884c9e0260d48d77a7f198b9
Merge "Fixes several failing mongo driver tests"