[CodeGen][NPM] Update dominator tree and post dominator tree consistently (#173485)
These passes run "RenumberBlocks()" on Machine function which renders
the dominator tree analyses in the cache stale (though passes may not
change anything structurally). we need to update the block numbers in
the cached analyses if we are to return PreservedAnalysis::all(). This
is not an issue with legacy PM since none of these passes preserve
dominator tree analyses anyway.