Don't leak the last surface and improve SDL_surface refcount test