notifications/libp2p: Terminate the outbound notification substream on `std::io::Errors` (#7724)
This PR handles a case where we called the `poll_next` on an outbound
substream notification to check if the stream is closed. It is entirely
possible that the `poll_next` would return an `io::error`, for example
end of file.
This PR ensures that we make the distinction between unexpected incoming
data, and error originated from `poll_next`.
While at it, the bulk of the PR change propagates the PeerID from the
network behavior, through the notification handler, to the notification
outbound stream for logging purposes.
cc @paritytech/networking
Part of: https://github.com/paritytech/polkadot-sdk/issues/7722
---------
Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>