The class limit is arbitrary and not stored in game state.
This change prevents all entities in classes after the 255th class from being dumped into the first class.
It was already possible to define more than 256 per class, but not possible
to use them as the index used in GUI and passed through commands was limited
to a byte.
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.