PeerManager::fetchOrCreatePeer is useful to add a new peer from a
proof and check the proof at the same time. The current implementation
does not provide access to the validation state, so we just know if the
proof is good or bad. It creates a ProofValidationStatus that is not
This revision add a version of fetchOrCreatePeer that takes a
validation state as an output argument, so that we can inspect the
reason of failure more in detail. This will be useful when we need to
decide whether or not to keep the proof in an orphan pool.
This is a small piece of D9370.