XWIKI-10069: Fix the 'use suggest' in DBList

* Call the query chains with dictionaries
XWIKI-10069: Fix the 'use suggest' in DBList

* Factorize the code for printing the XML file