Hacky implementation of namespaced enums

To get it to stage, we're inserting `pub use`s in expansion. This
doesn't work for enums inside of functions due to #18084, so so enums
have been extracted to the containing module.

The `pub use` hack is bad since it exposes variants of private enums in
the public APIs, but we only need to keep it around until a snapshot
hits.