query: Port MIME type filter to GPtrArray

We have been using doubly-linked lists to store MIME type names strings.

But this is not a great container for strings, and we are copying the
lists multiple times.

So, use GPtrArray instead. This avoids copies thanks to reference
counting, and enables autocleanup thanks to built-in data freeing.
3 jobs from master in 9 minutes and 21 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #166874
flatpak devel

00:08:36

9.0%
 
  Deploy
passed #166875
pages

00:00:44

passed pages:deploy

00:00:00