Adding database detection to migration tests

Currently the database migration tests will always run regardless of the
presence of an active database. This change adds a skip to the models
sync test if the database is not detected.

Changes
* changing the names for the mysql and postgresql detection functions to
  make them more publicly visible
* adding a function to the test class to gate database presence
* adding a test_models_sync wrapper to the base migration test class,
  this checks for database presence before running the test

Change-Id: Ic1c69fffe818763308d831d1ba5c0d030623e0dd
Closes-Bug: 1403158