Optimization in KDE-PIM
First step to optimize collection deletion.
Reduces number of queries per item in a deleted folder by 2 and prepares
the code for moving more operations out of the O(n) part. Which would
actually be easy if Sqlite would support joins on DELETE queries, as
MySQL does :-/