Adding a general handler for upgrading protocols

This is a sketch at a general mechanism to upgrade protocols from HTTP (with HTTP/2 in mind).  If we decide that this is a good idea, then we could potentially migrate websocket to use this as well.