pdf: enable eslint checks for no-var and prefer-const

Most of this change was automated by running `eslint --fix` but a
few cases were resolved manually (in particular global definitions
and typedefs).

Bug: 792774
Change-Id: Iea4e373a088d7d276975bf946a738bc9d81772c3
Reviewed-on: https://chromium-review.googlesource.com/c/1355302
Commit-Queue: dstockwell <dstockwell@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612985}
19 files changed