wined3d: Unset the depth/stencil surface before checking resources in wined3d_device_...