fdo#72041: Intern strings in the external ref cache with the host document.

To ensure that string comparison with those from the external ref cache
works correctly in functions such as VLOOKUP.

Change-Id: Ib5a466cb6c4b26439abe61b0c17406fc8139f6c0
(cherry picked from commit 2bcd18892f1903d2434bc5dc6828841e49bb78a2)
Reviewed-on: https://gerrit.libreoffice.org/8149
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>