lib_wam: Switch direct transport to promises.

The async guarantee of lib.wam.DirectTransport was setTimeout
based, which comes with a perf penalty.  Switching to
Promises fixes that.

Change-Id: Ief1cfe224e93135c2d0be0f5104264b43eb14579
Reviewed-on: https://chromium-review.googlesource.com/187710
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm 1.30: Scrolling speedups.

* hterm_scrollport.js: Cache screen size.  The getBoundingClientRect call
  dominated profiles of `cat /var/log/messages`.  Now we determine the screen
  size after each resize event and cache the result for later.
* hterm_scrollport.js: Remove calls to syncScrollHeight and
  syncRowNodesDimensions from redraw_, since they're expensive and redraw_
  is called a lot, and those things should only change during resize/font-size
  changes.

Change-Id: Iff0652ea5e54fef6b70da8e6a815223ff5f839dc
Reviewed-on: https://chromium-review.googlesource.com/187010
Reviewed-by: Marvelous Marius <mschilder@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
nassh: Fix undefined var reference in google relay

Change-Id: I16c5573e6f832552e61c9cd721dda79e07b4322b
Reviewed-on: https://chromium-review.googlesource.com/187711
Reviewed-by: Marvelous Marius <mschilder@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>