web: Unbreak linting of undefined variables and functions.

Js-lint used to grep for "^function ..." and "^var ..." in all files
and register them as global definitions.  This meant that for example
resource_debug from cockpit-docker.js would be allowed to be used
everywhere even though it is a local function.

This is fixed by only registering functions and variables starting
with "cockpit_" and never using that prefix for local definitions.

Closes #462

Reviewed-by: Stef Walter <stefw@redhat.com>