base: window.debugging instead of cockpit.debugging

We want debugging to be usable during loading of Cockpit and
elsewhere.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
playground: Move the internal page into its own package

And rename it to #playground ... it has hammer.gif after all :)

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Use 'phantom-tap-xxx' as our TAP communication with phantomjs

Since these variables and canaries are not QUnit specific, rename them.
We'll want to run other phantom tests via our phantom driver.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Add some javascript tests actually spawning processes

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Add "directory" option to text stream protocol

This spawns the process in the right directory.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Add "error": "output" to spawned textstream channels

This includes the error output in the textstream output.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: cockpit.js can be loaded without jQuery

This is necessary for the AMD module loader to work which will in
turn locate and load jQuery in later commits.

In addition this gives developers using things like dojo in packages
a small API for interacting with cockpit-ws and the message stream.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
doc: More spacing between entries in guide reference sections

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
examples: Add some examples of building a simple component

This currently uses the #playground task since we don't have a way
to add arbitrary tasks to the Cockpit UI.

Closes #1399
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: List canonical package name first

In the package listing always place the canonical package name first.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
pkg: An API in cockpit.js for package lookup

This will also be used by the AMD loader

Closes #1398
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Provide cockpit.transport.origin property

This is the same as window.location.origin, but we cannot rely
on the latter, since it is not supported by Internet Explorer,
even version 10.

Add documentation and tests.
base: Implement transport.filter() and transport.inject()

These methods allow one to filter incoming messages and inject
outgoing messages. Needed when forwarding WebSocket via another
web frame.
ws: Cleaner channel-seed suffix

channel-seed should generally be used as a prefix. So add a
separator in to the mix from the very start.
base: Expose the transport options from the "init" message

This is similar to exposing channel.options. Necessary for forwarding
WebSocket to another iframe.
base: Channels to the right host provided by the init message

The default-host is now carried by the init message. We use this
to determine the default "host" field in channels.
base: Send cockpit protocol via parent frame where possible

Instead of each frame opening up their own websocket, send
messages via the parent frame if possible.