flags: split up and rename ENUM_FLAGS

ENUM_FLAGS gets split into DECLARE_FLAGS_TYPE and
DECLARE_FLAGS_OPERATOR. This way the former can be called inside the
class and the latter outside the class.
DECLARE_FLAGS combines both DECLARE_FLAGS_TYPE and DECLARE_FLAGS_ENUM,
replacing the ENUM_FLAGS.
file: ENUM_FLAGS was renamed to DECLARE_FLAGS