Registers the enum constants and int encoder for the given enum class. Called by annproc-generated code at startup; user code normally does not invoke this directly. fromInt and fromName are derived from entries on each lookup.