Deduplicating/merging duplicate contacts based on more than just email/company/phone/mobile

Deduplicating/merging duplicate contacts based on more than just email/company/phone/mobile

The current function does not pick up secondary emails or names, this is crucial as most contacts have more than one email address, so after an import, there are often double entries for the same person just because they have more than one email.