QDict: Introduce new iteration API
It's composed of functions qdict_first() and qdict_next(), plus
functions to access QDictEntry values.
This API was suggested by Markus Armbruster <armbru@redhat.com> and
it offers full control over the iteration process.
The usage is simple, the following example prints all keys in 'qdict'
(it's hopefully better than any English description):
QDict *qdict;
const QDictEntry *ent;
[...]
for (ent = qdict_first(qdict); ent; ent = qdict_next(qdict, ent)) {
printf("%s ", qdict_entry_key(ent));
}
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>