moved type traits to detail namespace
added type-safe bitflag type
changed c-enum to scoped enums, use EnumFlags for bitfield types