PDO conversion

Mapped all old deprecated MySQL functions over to PDO class. Stripped
out old files and unwanted code.