Support top-level enums

This PR adds generator support for top-level `enum`s (ie. declared outside a `message`).

It also removes the apparently unused `file!` method -- please let me know if this has to stay for any reason.