Add a const version of findNearestCommonDominator to PostDom for convenience.

PR16283.