Add code to read package indices

This will be used in multiple places, e.g. for nested packages, or to
transmit package information in online repositories.
This format should stay as simple as possible, all the complex metadata
is stored in AppStream XML.