Bug 960707: Change database name during MySQL restore

https://bugzilla.redhat.com/show_bug.cgi?id=960707

* This properly restores the database in a MySQL snapshot/restore
* It also fixes the `wait_for_mysqld_availability` command
* Fixes for mock cartridge that's been failing in extended tests
* Fixes for postgres extended tests