d3dretrace: Cope with D3DLOCK_DONOTWAIT flag.

Same as commit 999284fd424cbf7dde024f949cdece0f308d41db, but now for
D3D9.