The native WebSocket is in a much better position to do queue
management than us. We also failed to check the return value and
set up a timer, causing stalls.
This gets us in sync with websockify as of 40238b00.
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.