Fix tests for factory methods.

Due to the way the factory tests were being set up, they were not being run properly. This pull request fixes that.

The problem was being caused by the factory being constructed during test setup. Since the gocheck.C object from the test setup method was being passed on to the factory, failed assertions in factory methods were not being properly handled. A gist that demonstrates this can be found here: https://gist.github.com/tasdomas/649ecf86ba43e4cd4b36

This resulted in some code being broken, but not immediately obviously so. Because of that some changes in this PR are there to make the now functional factory tests pass.
Driveby: this should really be taking its name from the charm, shouldn't it? we can get the charm first, defaulting to mysql if unspecified, and then derive the service name from the charm name.