optimize CLJS state machine

case was being, but case is not efficient in ClojureScript. Instead
use cond with == since we're only matching on integers. This
simplification also results in eliminating superflous closures from
the generated JavaScript.