The networking C++ code contains a lot of cut and paste code. This change eliminate nearly all of the duplication in the C++ broker.
It also refactors transport support so that transports can only listen for incoming connections or only be used to create outgoing connections which wasn't possible before, but is useful in some cases -
- When You are using a multiplexed SSL connection which will also accept TCP it should still be possible to have a TCP transport which can only create outgoing connections, before this was awkward to achieve.
- Some transports don't really support outgoing connections properly (rdma and all transports on windows) and so they should be able to not register to create outgoing connections.