Add freelist cache.

This commit adds a cache to the freelist which combines the available free pages and pending free pages in a single map. This was added to improve performance where freelist.isFree() was consuming 70% of CPU time for large freelists.

/cc @mkobetic @snormore
Hm, I haven't noticed this before, but how come you can also free pages that are <= txid? Does it mean that tx that started earlier must have also finished earlier?