Update the contact model when the sort and filter change.

When the filter and sort order change, the model was just appending new results
to the model without removing entries that don't match the filter anymore and
without updating the sort order of existing entries.
The easy fix for this would be to reset the model before creating a new contact
request, but this causes the delegates on the QML UI to be destroyed and
recreated, which results in flickering and not smooth UI interactions.
This change does a selective update of the model by doing the following steps
when the contact fetch request finishes:
- remove entries that don't belong to the result set anymore
- append items that are not yet in the model and move items that are at wrong
  positions to their final position.
Task-number: QTBUG-32863

Change-Id: I5dae693bf6c5b1c2bb8229670b0d7cad29f512d4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Renato Araujo Oliveira Filho <renato.filho@canonical.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>