run mysql_install_db if datadir is set annd mysql database is missing
Rework the mysql initdb functionality.

This reworks a previously unmerged PR to clean up the code a little and
adds a test for it.
Make sure we notify the service.
Merge pull request #536 from apenney/mysql_install

Handle changing the datadir properly.