MT#5879 Remove Country processing warning.

(cherry picked from commit 9d80cba5fd51314bd4909505fc09ce05aa232080)
(cherry picked from commit 78a6d8dd96649f969bd9342e418e6c18ef0ce4ff)
MT#5879 Fix billing_mapping logic, use the latest b.m. as actual.

(cherry picked from commit b90be26a2e6fad716c131640db2fd03c040084af)
(cherry picked from commit 54b7f0cac61af9eb313b430fab0ab908cd8b0061)

Conflicts:
	share/tools/generate_invoices.pl
MT#5879 Fix memory issue

Don't save or fetch data for all generated/sent invoices.
Fetch data one-by-one.

(cherry picked from commit a393853e65380ab2d5cf8c4a746ffb430e2652f7)

Conflicts:
	share/tools/generate_invoices.pl
MT#5879 Fix UTF-8 email send. Further fix of memory usage issue.

(cherry picked from commit 0610d530113fc23e229f36b3be847a409cf8bc04)
(cherry picked from commit 6bcca230fc5911e2a35dfb95367036b98e0e4fc9)

Conflicts:
	share/tools/generate_invoices.pl
MT#5879 Additional fixes for automerge of the memory fix.