Adding utility functions for detecting and manipulating branches.

This PR pulls out some of the helper routines from the specialized_branched_loops code in PR #482 and provides some correctness testing for these visitors and mutators. These functions might be useful in other contexts, but the main reason for pulling them out into their own file is to help the readability of the specialize_branched_loops code, and make it easier to test them independently.
I think it would be cleaner (and make it much clearer that this doesn't risk combinatorial behavior), if you tracked the set of variables that depend on name using a Scope<int>, instead of keeping around a Scope<Expr>. The scope would start with name in it, and nothing else. The other visitors could do:

if (expr_uses_vars(op->a, scope)) ...

and the the let visitor could do:

if (expr_uses_vars(op->value, scope)) {
  scope.push(op->name, 0);
}

This would also let you revert the extra Scope<Expr> in expr_uses_var.

Basically, a Scope<Expr> is almost always a bad idea. Instead of deferring analysis of the value until its use, what you want to do instead is analyze the value, and put the results of the analysis into a scope.