Add support for passing a custom allocator with the new [allocator API](https://github.com/rust-lang/rust/issues/32838).