d3d10core: Add locking around wined3d calls.