MT#5879 Remove Country processing warning.

(cherry picked from commit 9d80cba5fd51314bd4909505fc09ce05aa232080)
(cherry picked from commit 78a6d8dd96649f969bd9342e418e6c18ef0ce4ff)
(cherry picked from commit bb864b37b4fdd49edb7b178bfa6c5f5dbb104787)
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

(cherry picked from commit 41cc6f5fdad7ae6e9963df6dbf92ba72fa2d5a7f)
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

(cherry picked from commit 011bfcd689f694eed3a0b4e1842a692ac34c3704)
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

(cherry picked from commit 34a46149cdf774ba29126d382c50c8065fdacf9c)
MT#5879 Additional fixes for automerge of the memory fix.

(cherry picked from commit 18da18110e5aafa8b792a3b12c230f71d7a499e3)