Fix roster sorting
By a mistake the items were not updated correctly. The old
'lastExchanged' datetime was set again instead of the new.
This also removes the ORDER BY clause from the SELECT query in the
RosterDb. Sorting is done completely in the RosterModel now.
There was also a remaining issue with the id being not optional in the
messages table: When updating a message an empty id could still be
inserted. This caused a crash.
Fixes #298.