fixed connectionpool concurrency test:

- reduce aquired connections to 80 since postgresql has 100 max connections per default
- added additional assertion for total number of aquired connections
fixed connection checking

can't use lastUse to determine if connection needs to be tested since it's updated
on connection release. introduced lastCheck instead.

additionally try to close the connection if invalid to free any bound resources, and
fixed timeout for isValid() - it's seconds, not millis
surround connection retrieval in try/catch block to keep running even if no connection can be
retrieved (eg. in case the database is down)
Update loadJar to use Repository instead of fs

The use of fs caused it to fail to run under servlet container like Tomcat.
formatting
Merge branch 'allencblee-master'
various changes towards cache clustering:

- lazy-loaded entities are cached using a new constant LOAD_LAZY as value instead of null. reason: some cache implementations don't allow null values (and null is not an explicit value either)
- key instances are no longer cached - the benefit of this is negligible, and prevents serializing cached values
- store is now an event emitter, and emits a "commit" event containing the objects modified during a transaction
added the array containing the storable/collections keys modified during
a transaction to the "commit" event data too (might be handy for
invalidation messages send around)
fixed circular dependency woes by not using destructuring assignment when
requiring storable module in collectorgenerator

LOAD_LAZY constant is now again a Storable constructor property
commit event data now contains only the keys of storables touched in a transaction.
this should be sufficient for invalidation messages.
bugfix: make sure the entity of a lazy loaded storable is fetched from database
before persisting any modifications

changed user-facing storable constructor to start with an empty object entity
instead of undefined - now Store.getEntity() is only called if the storable is
lazy-loaded.
fixed check for commit event listeners
forcibly evict the collections of a removed storable
this ensures that such collections are part of the commit
event data
removed debugger statement
bugfix in query grammar
access mapping via storable constructor instead of calling getEntityMapping()
added missing brackets in exists condition
implemented onSave/onRemove callback execution

if a storable instance implements onSave() or onRemove() these
callback methods are executed after successful transaction commit
mapping now has an array containing all collection mappings

currently only used for easier collection invalidation
of removed storables
minor loop simplifications