Fix cleaning up after texture or buffer readback
The resource update in the render pass wasn't cleared when the mode
changed leaving old resource update pointer with destroyed resources.
Store the pointer in the oitRenderContext instead, which gets cleared
when the mode changes.
Also store the pending and completed QRhiReadbackResults in
oitRenderContext and deallocate them when calling reset().
Also dedup the readback code in renderPass between buffers and images.
Pick-to: 6.12
Change-Id: Ie1113caad2c48b6964f42ff3e6f213cf169f22e1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>