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