More memory and caching tweaks and some cleanup.
Adding some netfilter stuff for Orbot.