Added database method getItemsWhere
Added trigger on sync complete
Linked due count updates to global sync listeners