[contactsd] Improve sim contacts import logic

This commit ensures that sim contact nicknames are trimmed prior to
being compared with device contacts, or stored as device contacts,
to ensure that round-trips don't cause duplication due to automatic
whitespace trimming which the qtcontacts-sqlite engine does by default.

It also ensures that we only save numbers from sim contacts into the
associated device contact if the number is unique within that contact,
to ensure that round-trips don't cause duplication if a sim contact
has multiple identical phone numbers in its record.
Merge pull request #41 from chriadam/simimportsmall

[contactsd] Improve sim contacts import logic