tools: Migrate to use nodejs tooling for validation and minify

This requires that npm and nodejs are installed in order to build
Cockpit from git. Tarball builds should not be affected.
base, shell: Fix issues highlighted by jshint

Closes #1479
Signed-off-by: Marius Vollmer <mvollmer@redhat.com>
 * Fixed more issues found by jshint