xmerge: ensure that the stream is cleaned up before the method returns

Change-Id: I377ae1a7b71c207313ad3468a51b1ab06b9fffd5
Reviewed-on: https://gerrit.libreoffice.org/11939
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>