Base Database Class

http://community.mybb.com/thread-162474.html

This pull request adds a base database class based on the MySQL classes but that works with MySQL, PgSQL and SQLite.

Also fixes potential error in db_pdo where it was using an undeclared variable $user when connecting.