BM-21666 : Fixed: Incorrect sorting of address list in composer autocomplete
The address list in the composer autocomplete text box was not sorted correctly: the most relevant addresses appeared after the least relevant.
This correction introduces several changes:
Mutation interface upgrade : The logic for calculating address weighting is now handled within mutations, rather than being delegated to the caller. Mutations now accept only one e-mail address, and either increase its weight or exclude it from semi-automatic data entry.
Improved address weighting algorithm: Previously, the weight was increased by adding Date.now(), which gave excessive weight to addresses that had been the subject of frequent communications in the past. Now, repeated e-mails give a "bonus" to an address, but this bonus diminishes over time.
For example, after writing to someone 3 times, she will have priority over recent contacts for 20 days, after which she will lose priority if she receives no further e-mails, after which they lose priority if no further e-mails are sent.
Corrected sorting in MailContactRecipient: The address list was partially sorted in reverse order; the getterADDRESS_AUTOCOMPLETE now places the most relevant addresses at the end and MailContactRecipient sorts them at the beginning.
BM-21677: Restores correct operation of the "Remove this suggestion" button