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
interesting I'd expect ```buildcache``` to be called only once in this function.