Use BitFlags trait for bitfields

Adds a fields method on objects that implement BitFields which returns
a vec of individual bits. Unfortunately the trait can't make use of
the bitflags's own bits() method or bits field, and each bitflag needs
to override its own bits() method inside an `impl BitFields for Whatever`
block.