Fix texture resource tracking by the user pass manager
This fixes the problem with releasing the texture "correctly", as that
worked by happenstance before... This is just a first step to make the
tracking more robust and correct, there's still a need to move the RHI
texture tracking into the buffer-manager, or a similar approach, that
lives under the context so we track usage per-window and not per-layer,
as is the current situation.
Pick-to: 6.11
Change-Id: I5880c40a6159729062313965a4757edc67f609f1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>