[when-with-enum] Refactoring of switches codegen
[when-with-enum] Generate TABLESWITCH/LOOKUPSWITCH bytecode command in case of "when" by enum entries
[when-with-enum] Refactoring: removed code duplication when iterating over constants