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>