Some minor MM related refactoring

Refactors some code of SwFEShell::Paste and
SwDBManager::MergeDocuments to make it more readable.

Change-Id: Ifd78d6a44fa78eaf1f4fca63f4bbd3ee43ca129d
Reviewed-on: https://gerrit.libreoffice.org/10965
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>