GUAC-556: Fix JavaScript definitions of UPSTREAM_TIMEOUT and UPSTREAM_ERROR - they were swapped.
GUAC-558: Send status along WebSocket when end-of-stream is received.
GUAC-558: Do not trigger client onerror for tunnel onerror.
GUAC-558: Add specific handler for tunnel state change. Add state property and values. Clean up warnings.
GUAC-558: Do not send pending messages if tunnel is closed.
GUAC-558: Do NOT make initial request if connect failed.
GUAC-558: Fix calls to onerror handler, switch to corresponding close_tunnel() prototype.
GUAC-558: Ensure state/error handlers are called ONLY on the last tunnel. Rewrite to clean program flow.
GUAC-558: Use same error handling function throughout HTTP tunnel. Ignore RESOURCE_NOT_FOUND for connected HTTP tunnels as that actually signals end-of-stream.
GUAC-558: Send proper error when unable to connect due to lack of context.
GUAC-558: Add separate error strings for tunnel errors.