Add Flags teplate

Flags is a typecons template for storing OR combinaton of enum
values in a type safe fashion.