Changed expr_uses_vars back to using a custom visitor.

It turns out that I actually do need a custom version of expr_uses_vars, which I've added back to the linear_solver. This version takes 2 scope objects, one with the list of free variables, and one with a set of bound variables and the exprs they are bound to. The visitor can then dive into the second scope and continue to look for free variables in the bound expressions. This is important in the branched_loops stuff to avoid having to explicitly substitute in bound values when branching let stmts.