Copy mail merge source instead of loading
Copy mail merge source instead of loading

Currently a mail merge loads the styles from the source document
and also loads the original source per mail merge dataset.

The new code is based on the MergeDocuments function and swaps the
loading with an internal document copy to improve mail merge
throughtput.

For a mail merge with 99 datasets and a two pages document,
callgrind shows an improvement from routhly 44 to 31 billion
inclusive instructions for the single SwXMailMerge::execute call.

Change-Id: I6929ba371f81c3ea1f26ea3a25e7751bc53256e3
Reviewed-on: https://gerrit.libreoffice.org/7433
Tested-by: Michael Stahl <eef8671db506f9731c0438a7613853b6391ca841@redhat.com>
Reviewed-by: Michael Stahl <eef8671db506f9731c0438a7613853b6391ca841@redhat.com>

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core