[libcommhistory] Fix DatabaseIO::getEventBy*()

Detected by commhistory-daemon's ut_messagereviver.

Compare this change with DatabaseIO::getEvent() which has been fixed
with 5169661 (Use a basic query builder for event/group properties) and
similar change made to DatabaseIO::getGroup() with 4d658fe (Fix issues
uncovered by ut_eventmodel).
Merge pull request #55 from martyone/master

[libcommhistory] Fix DatabaseIO::getEventBy*()