Move uses of enum to bitflags!.

There are still others, but this is the first batch.