Universal door

These are changes to support a single listening socket that works with http, https, peer, and eventually ws and wss connections. This is not quite ready for merging but posted nonetheless.