Refactor mysql module

Goal is to avoid undefined variables (caught with strict_variables) and
better use class parameters to avoid useless multiplication of similar
classes.
Merge pull request #1 from ckaenzig/mysql-strict-variables-refactoring

Refactor mysql module