PROV-622, PROV-623 Catch and handle deadlock and gone away database errors in mysql driver. Still todo:

1. Add similar handling in mysqli and pdo_mysql drivers
2. Change database error handling to forward to a decent looking HTML page
Merge branch 'master' of github.com:collectiveaccess/providence