Fixed a bug in specialize_branched_loops where conditions involving variable for more than one nested loop were getting branched incorrectly.
Fixed a memory bug in specialize_branched_loops.
Did a fairly big rewrite of how the BranchCollector IRVisitor visits nodes. This was done to generalize how we visit all non-branching nodes. Some node were still not being handled properly, and these changes should make it easier to add handling for any kind of non-branching node. Fixed some bugs with the handling of For nodes, we weren't branching the bounds exprs correctly. Also, changed the code explosion limiting mechanism from a limit on the depth of the recursion to a limit on the total number of branches. The branching limit is currently enforced softly, in the sense that when we check if we can still branch we may actually add more than 1 branch after that which would go over the limit, but it still caps the code growth.
Added methods to BranchCollector to handle Evaluate and Cast nodes. Fixed a bug with the handling of Call nodes that have no args.
Reorganized the order of the visitors is the BranchCollector to match the order in IRVisitor, so it is easier to keep track of which we visitors we have added. Added fall back conditions for nodes that have the potential to branch but didn't.