[libcontacts] Prevent crash in coalescing import contacts. Fixes JB#12291

Remove obsolete contacts only after traversing indexed contact list.
Do not add multiple instances of contact nickname.
Do not use shadowing variable name.
Merge pull request #53 from matthewvogt/coalesce-crash

[libcontacts] Prevent crash in coalescing import contacts. Fixes JB#12291