[PATCH 3/4] d3d8: Add reference counting helpers for textures.