[qtcontacts-sqlite] Test priority of local details in aggregation

Also ensure that a local constituent added to an existing aggregate
produces a correct result.