wined3d: Hold the wined3d mutex in device_process_message().