move to refs instead of loop-recur inside the evaluator

The problem with loop-recur is we have to pass all the loop variables,
which is distracting. By mutating refs, the code only shows which
variables are changing.