shell: Only show the "Extended Partition" choice when it makes sense

Fixes #1305
Reviewed-by: Stef Walter <stefw@redhat.com>
test: Test extended partitions again

But in a carefully limited way.

Closes #1324
Reviewed-by: Stef Walter <stefw@redhat.com>
Use the term 'package' instead of 'module'

The packages really are just collections of resources, with the actual
html files and javascript files and (soon iframes) providing the actual
modular architecture.

In addition 'modules' is used a lot in the javascript community to do
with module loaders etc. We want to avoid confusion there.

Rename 'module' to 'package' everywhere. And move the modules/ directory
to pkg/ which is shorter and clearer.

Closes #1310
static: jQuery becomes part of the the packages

No jQuery on the login page is the upshot here.

We'll probably unfortunately get to the point where different versions
of component have different jQuery requirements and so on. So jQuery
gets loaded by the packages.

See later commits for a solution that prevents needless copying of
jQuery all over the place.

Closes #1315
agent: Tests can override the location that packages are loaded from
agent: Don't list packages that fail to load/checksum

Be strict about this stuff now. We can't become stricter later
once this becomes API.
agent: Validate that package names and their files have sane names

Allow alphanumeric and a very small set of punctuation in package
names and their file names. We use these directly as URI components,
and can avoid confusing encoding this way.
common: Implement basic templating for cockpit resources

These are very similar to autoconf configure templates and consist of
@@variable@@ to substitute 'variable' for a value. There is an API
that implements this, and we now use it for index.html

This will be used for substituting package checksums for package
names in resource files.
ws: Use templates to expand paths in resources

Strings like @@shell@@ are expanded to the full checksum and/or
name of the package in question, including addition of the relevant
host to load from. This allows package to refer to files from other
packages simply.

The shell package needs to be expilictly qualify all of its paths
since it is not loaded into its own frame/document but replaces
the login page.

Resource URLs now all have the same prefix, and automatically
detect whether a checksum or package@host style is in use.

They look like this:

/cockpit/xxxxxchecksumyyyyy/path/to/resource.file
/cockpit/package/path/to/resource.file
/cockpit/package@host/path/to/resource.file

The prefix '/cockpit' was chosen so that when other web apps
do deep embedding of our components, the prefix should not
conflict.
agent: Prefix checksums with the '$' character

This allows us to treat them just like package names, but
differentiate them exactly where necessary.

The '$' character is also a valid javascript identifier character
which allows us to use these as module names for AMD loaders and
such.
agent: Resolve checksums in the agent instead of web service

This will make life easier for people embedding Cockpit if they
end up handling the resource channels and resource loading
themselves.

We also change the JSON format for listing packages

Allow us to convey information about packages with multiple
names more cleanly and without duplication.
agent: Add support for aliasing packages

This allows a package to claim a well-known package name of a feature
that it provides. It also allows us to mark a certain base package
as the 'latest' etc.

Closes #1316