fix BIOS.util.defineRockerSwitch logic

The logic for rocker switches got broken when I normalized them to
accept states 0, 1 and 2 instead of -1, 0 and 1.

This commit fixes that. In addition, rocker switches now handle the
case where they are switched from state 0 to 2 or 2 to 0 correctly.