Add doSwitch DSL built-in, close #1478
Introduce resources
Add an optional else to randomSwitch with percentages, close #1479