support `jemalloc`

This is #158 rebased on top of the latest master, and with added support for Ubuntu.