Bug fix to protocol sanitizer.

Thanks, jshint!

Change-Id: Idd2d7b519785f3da7cb597f392045899a45d1398
JSHint cleanups: forward declarations, disambiguate variables.

Rearrange code where it's possible to ensure functions appear before uses.

In other places, add an explicit forward declaration.  This isn't strictly
necessary, but it technically ensures that behavior is the same across
JavaScript implementations (the spec allows different initialization behavior)
and it shuts jshint up.  Seems easy enough to make jshint happy.

One case where two variables named 'tsr0' appear in the same scope; renamed
them slightly to avoid the conflict.  (This lets jshint catch if I missed a
renaming; if I'd just moved the declaration to the top of the method it
would be possible to hide a scope error.)

Change-Id: I35699cdd5cee02883a9f35fc5de3954080e72e0c
Remove unused variables.

'jshint --show-non-errors' shows unused variables.  Some of these are unused
function arguments, which are rarely bugs.  But try to fix the ones which
are forgotten/dead code and unnecessary require()s.

Change-Id: I685ccd8e388fd3acf75053a07e2f729398fa2855
Remove unused ext.cite.taghook module.

Change-Id: Iccde164396d48eac2d2eaae3487b6bb9c1fc0022
Merge changes Iccde1643,I685ccd8e,I35699cdd,Idd2d7b51

* changes:
  Remove unused ext.cite.taghook module.
  Remove unused variables.
  JSHint cleanups: forward declarations, disambiguate variables.
  Bug fix to protocol sanitizer.