reverted d2d8a43df0c1a8305339da5dd6ba8e476b367f04

use a lock object instead to properly sync the cache methods. this is necessary to
avoid errors when hashmaps are rotated or entries are moved from old to new table.
closing the statement also closes all open result sets
internal _props property is no longer writeable (doesn't need to be, and shouldn't be)
check if an idle connection is valid before returning it

other changes:
 * only check if a connection is valid if it's older than one minute
 * don't specify initial size and capacityIncrement
tuned collect method of AggressiveEntityCollector

- don't create a cache key if entity cache is disabled
- avoid retrieving the id column twice
slightly tuned collect method of AggressiveEntityCollector

skip entity cache lookup if it's not enabled at all
modified Connection.isValid() to allow force checking (needed for unit tests)
modified determineDialect to not use a database connection

retrieving the database metadata is expensive, instead use the driver name

various other minor changes
attach profiler after setUp has been invoked
fixed test for Connection.isValid()
use Date.now() instead of currentTimeMillis()
cleanup

- removed unused method quote()
- replaced call to export() method with property settings on exports.object
refactored connection pool

- worker no longer closes stale connections itself (impossible because vector is unsynchronized),
instead it posts a message to the pool
- close now correctly stops the worker (terminate alone appearently doesn't kill the interval set in worker)
- renamed methods to match the equivalents of other pool implementations (c3p0, bonecp)
- added util module containing various init and helper methods
connection pool module has been moved
- added initConnectionPool convenience method
- adapted to recent changes in pool implementation
removed hasEntityCache and hasQueryCache methods from store (both caches are public)
modified unit tests to use new Store.initConnectionPool method
re-added backwards compatibility
added benchmark for concurrent queries
minor changes in connection pool

- moved toString into constructor - this threw an exception because of an undefined connection property (dunno why)
- removed testRemoveDeadConnection: this failed with mysql because isReadOnly()/getAutoCommit()
apparently doesn't communication with the database, and thus doesn't throw an exception resp.
remove a dead connection from the pool.