[CI] Allow repeat of final depth PV output
Currently our CI fails in `test_ucinewgame_and_go_depth_9` if the final depth PV output is repeated. But that can naturally happen due to a ponder move extraction from the TT (since b9f3273af12266b81c00993a360f5f544c345ce9).
This PR fixes this by allowing `info depth 9` to be repeated once, if the repeated PV is exactly two moves long.
While at it, write the code a bit more general so that it can also be used for depths other than 9.
closes https://github.com/official-stockfish/Stockfish/pull/7314
No functional change