Simplify the memory usage limits stuff during RDB import
Change dict type for dirty/flushing keys

The previous dict type wasn't automatically deallocating the strings for
the keys, which I'm pretty sure is causing some bad leaking behaviour,
especially in high-dirtying situations (like initial imports).
Allow freeMemoryIfNeeded to take a headroom parameter

This allows us to make sure there's *extra* free memory during the RDB load, which
reduces the number of times we've got to free memory and flush keys.