collect: fix crash in case of non-valid utf8 database entries

g_markup_escape_text() does not tolerate invalid utf8 strings.
we need to to fix those upfront.
Merge pull request #632 from upegelow/collect_utf8_fix

collect: fix crash in case of non-valid utf8 database entries