Support for generics that use enums as arguments.

Also, factorized max prefix search routine to be used with class fields
next.
Support for consts not documented in the main const index (!!).

Also, a search routine to identify enum fields.