Database caching optimalization & bugfix

- These PR rapidly optimize cache writes.
- Bugfix behaviour redundant refetch behaviour.
- Related forum thread: http://forum.nette.org/cs/13878-chybne-cachovani-nette-database-zpusobi-zbytecne-dotazy-do-databaze