Add sanity check to BasicBlock::getLiveOut and a warning if it fails.

* Make UserProc::fixUglyBranches use range based for instead of index-based iteration, should fix a few problems with accessing non existent Phi's