Change logic around template to stop service before replacing my.cnf.

This commit changes the template resource to write my.cnf to a temporary
location.  If my.cnf needs to be updated, then the mysql service
is stopped, the new config file is copied into place, and the service
is restarted.  This allows things to work with MySQL 5.6.