Branch visitors for detecting and mutating branches.

This PR replaces #547. The branch has been renamed to correspond to the name of the main file this adds.  I have addressed most of the comments that were still open in #547, and made some modifications that are dependent on PR #551.

You could be right, I don't have an example off hand, but I think that the idea was that this mutator needed to be called recursively until the IR tree is fixed. Now that I am thinking about it again, I'm not sure I can see why this would need to be the case.