rpc: add test-only sendmsgtopeer rpc
This rpc can be used when we want a node to send a message, but
cannot use a python P2P object, for example for testing of low-level
net transport behavior.
test: add basic tests for sendmsgtopeer to rpc_net.py
test: add functional test for deadlock situation
Note that we need to pass a valid block message to make this deadlock test work as expected (=fail before the fix in D17138), because in Bitcoin ABC the non-block messages are limited to a smaller size which does not reliably trigger the deadlock.
This is a backport of core#28287
Depends on D17138