Low: mysql: Refactoring mysql logic into common library that can be shared with galera agent

Galera is just mysql with some fancy wrappers. I have refactored
the mysql agent so we can create a new galera agent without
having to introduce a bunch of code overlap with the mysql agent.
All the code that can be shared between the mysql agent and galera
has been moved to mysql-common.sh