Run tests on MySQL and use travis-$DB environments.

refs #921
fixes #1385
Bugfixes for tests