Enforce unsigned type in flags.
Flag enums could be signed types - since the only operations performed
by the flags were bit ops, this was harmless, but the implicit signed/
unsigned conversions are caught in analysis tools like UBSAN that can
also catch real issues.
Added a compile-time enforcement of underlying unsigned type to the
flags class, and specified uint64_t for underlying type of the class
and the various flags that are passed to it.
Added some SFINAE to disable accidental instantiation of non-enum
types - before C++ 20 std::underlying_type on a non-enum is undefined.