Rewrite the exchange allocator to work without an active runtime. #4457