Bitset flags

A refactoring of the flag handling mechanisms in FSO. This introduces a way of handling flags in a type-safe manner, and reduces the #define clutter. Does require C++11.