pdf: deduplicate resources when copying from external PDF stream
When using external PDF stream/data (from PDF graphic objects),
make sure to copy the content of external PDF resources (fonts,
bitmaps, forms) only one time (by sharing the map between calls)
and every other use, just use the reference to the objects.
Change-Id: Ibaa632c8f74806eb195e69404551db6fd077a986
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104935
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>