Add compatibility with MySQL driver

Adds compatibility with MySQL driver and lays some basics for the other drivers as well.
No more custom editing your models when using PDO.

Keep in mind that PHP 5.5 will deprecate ext/mysql, see: http://www.php.net/manual/en/migration55.deprecated.php

This code is TESTED.