Split transport into TCP and UDP.

API change: connect and listen now take the protocol name as first
parameter.