Switch to connection pooling for SQL backend

PEX now requires Java 7 (for try-with-resources pretty much)
Be more careful with cleaning up SQLConnections
Fix some caching stuff