d3d9: Hold the lock in IDirect3D9 methods.