[libcommhistory] Fix random EventsQuery failures caused by QHash randomization

The randomized order of QHash in Qt5 could order events properties in a
way that caused invalid queries.