fdo#74424 Use Window::GetOutDev() to access ImplReleaseGraphics()

Part of the decoupling of Window from OutputDevice. We now get
the Window's OutputDevice instance and manipulate this. Do not rely
on the inherited function.

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