Replace flags.rs with stdlib bitflags macro

Closes #96.