[PATCH 1/2] wined3d: Factor out creating the window state thread.