Add check for empty keys, avoid PHP fatal error

Thanks to bigmudcake/edave from the Zarafa forums.
Change MAPI properties assigned to TEL TYPE for Thunderbird compat

Thunderbird expects the following mapping:

  TEL TYPE=work => 'office_telephone_number'
  TEL TYPE=fax  => 'business_fax_number'

Thanks to bigmudcake/edave from the Zarafa forums for this contribution.
Map FAX,OTHER to `primary_fax_number', Zarafa and OSX convention
First collate e-mail addresses, then sort them by preference

Use custom sorting routine to sort e-mail addresses in order of preference.
Previously we used the order of occurrence.