Store block optimizations

Numbers depend on the block, but it seeems to make it a few times faster mostly by heavily reducing number of sql queries. I focused on postgresql but it should improve other sequel adapters too. 

Review and comments about stuff like naming or code conventions very much welcome.