[xbuild] Add support for Before/AfterTargets.