Specialize branched loops

Continuation of PR #469 inside the main repo.
I added the StmtOrExpr variant after I had already defined Branch this way, as it became clear in the branch_children()/update_branch() visiting paradigm that I needed to mix Stmt and Expr nodes. Since then I have thought of changing the Branch struct to use StmtOrExpr like you suggest, but never got around to it as it didn't seem like it was going to make a huge difference one way or the other. But I'll take another look at it...