Added custom exceptions [WIP]

Inspired at http://www.doctrine-project.org
I'm not a fan of extending `PDOException` but I guess that due to compatibility concerns we don't really much of a choice here.