Allow Tor Browser to optionally use different memory allocators

Various external issues:

This can be accomplished by building with --enable-replace-malloc