Integrate HariKT PR #366 (for reconnect to PDO db when connection lost) and Interrobang/Klickstarter PR #382 (for support of MySQL socket).