ws: Cleaner building of control messages

Remove the dubios BUILD_INT logic when we want to add non-strings
to a control message, and just return a JsonObject from an interim
function which can be further modified. The simple string-only case
remains the same.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: New resource2 payload protocol

This is something that several future enhancements need. We need to
send back a header payload before the actual data that can carry
information that affects the HTTP Headers of the response.

Closes #1464
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Fix AMD dependency loader bug to do with circular deps

Our AMD loader would find circular dependencies when there were
none.

Closes #1469
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Remove argument counting logic from AMD loader

This is optional and complicates things. Lets make it a bit simpler.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Only provide default dependencies if factory is function

If there's no function involved, such as a module exporting an
object directly, then we don't need to provide default dependencies

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Simpler requring of jquery in cockpit.js

Less fancy tricks, more debuggable

Closes #1470
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>