Optimization in KDE-PIM
Reduce Item::hasPayload() calls.
Item::payload() already calls hasPayload() internally, and emits
an exception if the item does not have a payload.
So, use a try-catch block instead, to save 1 hasPayload() call,
which results in a 7% performance improvement.
I also added a incidence->type() comparison first, to avoid
throwing exceptions, because _cxa_rethrow appeared on callgrind,
so this is the fastest we can get.