Fix regression in SQL query in ItemRetriever introduced in parttable-optimization
Fix regression in SQL query in ItemRetriever introduced in parttable-optimization

The query relies on LEFT JOIN returning NULL values in case item does not have
the requested part stored in Akonadi. We were however using LEFT JOIN...INNER
JOIN to join in PartTypeTable and we also had the condition to match part types
placed in WHERE instead of the JOIN, so if an item did not have the part stored
in Akonadi, it was filtered out from the results, exact oposite of what this
query is supposed to do.

This was revealed by GID migration unit-test in kdepim-runtime which started
failing after the parttable-optimization branch was merged to Akonadi.

kolab-groupware/akonadi,kolab-groupware/akonadi,kolab-groupware/akonadi,kolab-groupware/akonadi