Direct3D: do not leak textures when recycling them

If several textures from the cache (i.e. used during the previous
call) are matching we invalidate all of them but only keep the last
one. We therefore lose all references to the other ones.

Close #10248

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>