convert as many "enum" as possible to "enum class", and make them ": char" in the due course

Several enum types are "enum class" (i.e. typesafe C++ enums), several others are not.
Also making them ": char" should reduce the size of these structures.

Comments welcome!