shell: Use correct address for Docker terminals.

Previously, this would use 'undefined' which means localhost and thus
mostly worked, by accident.

Closes #1377
Reviewed-by: Stef Walter <stefw@redhat.com>
shell: Remove getTitle method of dialogs.

It is not used and just duplicates what is alread in the
h4.modal-title of the dialog.

Reviewed-by: Stef Walter <stefw@redhat.com>
shell: Factor out common code into get_page_machine

Reviewed-by: Stef Walter <stefw@redhat.com>
shell: Don't encode breadcrumb in URL

Instead, show a global breadcrumb that always looks like

  Hosts >> $hostname >> $page

The hierarchical navigation functions "go_up", "go_down", and
"go_sibling" have been replaced with "go_rel".

Every page now has a "machine" option that gives the address of the
machine to connect to.

This is an intermediate step, and the next commit restores full
navigation by putting local breadcrumbs into the individual pages that
need them.

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

Closes #1365
Reviewed-by: Stef Walter <stefw@redhat.com>
tools: Make jslint print problems to stderr correctly

Since stdout is being used for the output file, print problems
to stderr.

Closes #1381
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Fix rcompile to work under other LANG settings

This is because the only portable way to detect whether something
is a function is to use the output of 'type'. That output is
translated (the -t option is not portable).

Fixes #1380
Closes #1382
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
test: Fixes to make tests set LANG=C before running

Lots of stuff requires parsing output from the host, including
log lines, and diagnostic messages from rpmbuild

Closes #1383
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
shell: Don't let "?machine=undefined" leak into the URL.

This will come back as a string and we will try to connect to a host
named "undefined" via SSH.
shell: New layout for navigation.
shell: Adapt update_global_nav to new layout.
shell: Move system information code to server page.
shell: Remove "Rescue Terminal" option from dashbord menu.
shell: Highlight active navigation tab.
shell: Save space on the server dashboard

By using the hostname and realms directly as the label of buttons for
changing them.  Also, always leave a realm via a dialog.
test: Adapt check-shutdown-restart
shell: Register dialogs separately from pages.

So that the upcoming refactoring can be done without having to bother
with dialogs.  Dialogs will get their own makeover.
shell: Register page constructors, not pages.
shell: Move URL encoding and decoding into "base" package.
shell: Make cockpit.loc private.