Fix JSHint warnings in TemplateHandler

This is mostly a small step towards eliminating the global pollution in
defines by importing TagTk etc constructors explicitly.

Change-Id: I8661e81942dd86490d5591313e91ba3f1e8605e8