first sketch towards more efficient query caching:

instead of caching query ast trees and rendering them every time again, create a function that returns the sql string and the parameter array
create and cache the result collector as well
simplified sql statement generator function
variable renaming
cleanup
intermediate commit:
- removed Query constructor, instead export a set of functions doing the work (most notably select())
- query cache now contains the ast tree, the sql statement creator function and the collector instance for each sql statement (note: the collector can't be cached, see FIXME in query.js)
- sqlfunctiongenerator now returns just a function, nothing else (ie. not the collector instance)
- quick fixed collections and modified tests to pass
various refactorings:
- removed CollectorGenerator constructor, instead expose a single createCollector
method (no need for creating an instance)
- don't cache the collector together with the sql statement creator function and
the ast tree: it's possible that a manual query and an entity collection share the
same query, but they utilize different collectors - so caching it would lead to
unpredictable results
various refactorings:

- connection wrappers now have a connection property instead of a getConnection() method - this greatly reduces function calls
- by default connections now are read only - transactions and other data manipulating functions change that if needed (saves checking/setting read only state for every query)
- modified query to check if a transaction is open instead of the autocommit state of a connection before releasing the connection
more connection pool tuning: use two vectors for idle and in use connections instead of
one that requires iterating over to find an idle connection
mappings now get their appropriate jdbc type instance as argument

this saves lots of store.dialect.getType() calls (eg. in collectors), and can't change during runtime.
don't export sqlSelect(), renamed method
replaced calls of sqlUtils.close() with inline checks to reduce function calls
surround isValid() call with try/catch since it might throw an SQLException
modified tests to make sure all db connections are closed in tearDown

connectionpool_test didn't, and as a result transaction_test blocked when using postgresql
fixed SqlFunctionGenerator to handle nested select statements correctly

SqlFunctionGenerator can now be used in two different ways:
- as an ast visitor, returning the sql statement as string
- as a function generator, returning a function that creates the sql statement

The former use case allows easier unit testing, the only difference is that named parameters are no longer resolved during visiting the ast nodes. Instead the visitor's params array contains just the keys of the named parameters.

Added a static convenience method createSqlFunction() to SqlFunctionGenerator
minor beautifications, fixed docs of query methods
replaced old SqlGenerator with SqlFunctionGenerator (renamed to SqlGenerator)
added first simple benchmarks
added `sqlQuery()` method to query module to allow executing raw SQL queries against the store's database.

Renamed query module method `select()` to `query()` for consistency reasons.
PartitionedCollection is now functional again (was broken due to recent query changes)

Moved toString methods out of prototype definition because that lead to a (hidden) exception when setting up the PartitionedCollection prototype (referencing the Collection.prototype immediately invoked its toString method causing an exception)