[ADT] Take graph as const & in some post-order iterators (NFC).

This patch updates a couple of functions that unnecessarily took the
input graph by value, when it was not needed. They can take the graph by
const-reference instead, which does not require GraphT to provide a copy

Split off from D100169.

GitOrigin-RevId: bbf01f96b5ccc1dcb4d1d47cb55292c27c698dbb
1 file changed