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

* Remove use of `toArray()` method for results of queries