restructured sqlgenerator

SqlGenerator no longer dynamically creates a function - the benefit of this was negligible,
the job of the function moved into the query method of query module.

other changes:
- createCacheKey is now a static method of Key constructor, collection module has it's
own method since this one differs from the default one. saves some requires of cache module
- fixed setter of stringtype
- fixed toString method of store
- minor refactorings in storable
(cherry picked from commit bc7cff5)
fixed benchmarks
minor changes
- removed getResult() in query module
- renamed argument name "index" to "idx" in types module for consistency reasons
various minor refactorings:

store:
- dialect is no longer a getter function, instead the dialect is determined during construction time (saves lots of function calls). as a result determineDialect is no longer a store method, but a private one
- exposed store.entityRegistry
- moved various methods out of store constructor into prototype (no need to define them within the constructor function)

storable:
- moved get() and all() method declaration from store.defineEntity into storable module (that's where they belong to)

collectors:
- modified result collecting: retrieve column names and jdbc value getter before looping over result. this saves lots of getType() calls during looping over the result rows.
- collectors column offset is now zero-based
- removed getResultPropertyName methods from collectors, these get their alias now at construction time
(cherry picked from commit e0605ee)
disabled entity cache for tests

added test for value selection/collection
added list of property mappings to mapping instances

this is utilized in entity collectors for retrieving the result set row values, which saves
 the retrieval of column types (the property mappings already know which type
 to expect in a result set row). value collector might be a bit slower now since
 it still relies on the resultset metadata, which now must be retrieved for every row.
more minor tunings

- replaced mapping.isXyzMapping() methods with boolean values, no need for function calls
- avoid calling getMapping() for each property access in storable getters
don't retrieve resultset metadata, it's not needed anymore
defineEntity no longer creates tables and sequences

introduced Store.prototype.syncTables() doing that once for all defined entities.
call store.syncTables() in unit tests
modified loadEntity:

- make sure only mapped columns are loaded
- loop over mapping entries instead of using resultset metadata
- removed obsolete createEntity()
executeUpdate now retries if an SQLTransactionRollbackException occurs

this happens in case of a deadlock (which appearently is normal?), so wait a bit and retry for 5 times max.

other changes:
- pass the jdbcType for each parameter to executeUpdate (avoids unnecessary lookup in there)
- remove() now uses executeUpdate too to utilize retry functionality
- modified updateEntity:
  - make sure the id is part of the entity (got lost before, but didn't lead to problems)
  - avoid persisting mapped objects if they are clean
adapted CRUD test
replaced js cache implementation with concurrent linked hash map 1.4 (http://code.google.com/p/concurrentlinkedhashmap/)
bugfix in AggressiveEntityCollector.prototype.collect
added tests for entity queries using cache
fixed quite severe bugs in transaction

- make sure mapped collections of removed storables are removed from entity cache as well. steps to reproduce (only valid for mappings that don't use sequences for id generation):
  1. persist a storable with a mapped collection
  2. restart application
  3. load persisted storable and access the collection
  4. remove the storable and all storables within the collection
  5. create a new storable of the same type.
the new storable will have the same id as the removed one, and receive an invalid cached collection (i.e. the cached collection ids contain ids that no longer exist in database)

- transaction.reset() didn't work because the inserted, updated, deleted and collections hashes were cached in the getters
removed unused metadata argument
modified executeQuery: explicitly specify type (forward only) and concurrency (read only) when creating the prepared statement
simplified basedialect and types

- directly populate jdbcTypeMap in base dialect, no need for calls of registerJdbcType
- moved all get/set methods in types into their prototype