The test can fail under some condition because it waits for a proof to
become orphaned by waiting for the proof to be known by the node then
asserting its orphan state. But the proof is already known valid before
this call, so it is possible that the assertion fails because the proof
has not be oprhaned yet.
This diff extends the `wait_for_proof` facility to allow for supplying
an expected orphan state. This also removes some boiler plate from the
tests.
Ref T1611.