Make allocator_kind a query. Part of #85153 r? `@Aaron1011`
For more information about how rustc works, see the rustc dev guide.