convert enum NumberType and BracketType into enum class

as a follow up to an earlier change from unnamend enums (e30be09)