NIF file caching patch

This patch implements a in memory loaded NIF file cache to prevent excessive reloading. It depends on (or includes) commits from by previous resource load performance patch. I don't know how this should work, sorry.