alloc: Allow disabling jemalloc
alloc: Refactor OOM into a common routine