Namespaced enums

These changes bring us up to date with Rust's move to namespaced enums. We're also able to get rid of some duplication in enum names and modules.