Added an optional scope argument to expr_uses_var(s).

This allows the user to pass in a scope of exprs bound to variables, e.g. from let expressions. The visitor will dive into the bound expressions, whenever a variable in scope is encountered. I need this functionality in the linear solver and in specialize_branched_loops, so I added it to the generic method.
Done.