lib: Split out the actual logic of handling NoFlo UI WebSocket protocol

Makes it easier to replace it with something else, like noflo-runtime-websocket