[IR] Add three public functions to BasicBlock to handle bulk changes to PHINodes caused by changing control flow graph.
updatePHIEdges changes all usages of one BB into another BB.
duplicatePHIEdges duplicates all incoming edges from one BB into incoming edges from another BB.
fixPHIEdges checks if a given BB is still a valid predecessor and based on this uses either of update or duplicate.
This diff is a follow up after https://reviews.llvm.org/D33787. I am submitting a new diff and closing the old one, since the inline comments in the latter would be unintelligible after the API changes.