Clean up the PdoHandler and speed up sqlite tests