The main change is to start optionally returning the change in code size from InsertBranch/RemoveBranch. Alternatively, the code size could be inferred from the number of instructions emitted with getInstSizeInBytes, however this doesn't work in the RemoveBranch case.
Patch mostly by Tim Northover
Since you're touching all of these, it might be a good time to fix them to follow the naming convention (removeBranch etc).