update the int enum

This renames the int_enum module to intenum and updates the flag
handling to use a hidden base class which is created automatically as
needed.