removed usage of deprecated mysql extension

This PR removes all usages of ``mysql_*`` functions and uses PDO instead. THis does not only remove notices, but also frees us from the DSN parsing stuff. The changes made by @fighne in PR #45 and #48 are already included in this one.

Please not merge yet, this is still a work-in-progress.