The GetWorkItemCount implementation may look strange. It's done this way because of how WaitForAllItems is implemented. Alternative solution is to introduce separate counter for GetWorkItemCount.
-- v3: d3dx10/tests: Add D3DX10CreateThreadPump tests. d3dx10: Add ID3DX10ThreadPump:PurgeAllItems implementation. d3dx10: Add ID3DX10ThreadPump:GetQueueStatus implementation. d3dx10: Add ID3DX10ThreadPump:WaitForAllItems implementation. d3dx10: Add ID3DX10ThreadPump:ProcessDeviceWorkItems implementation. d3dx10: Add ID3DX10ThreadPump:GetWorkItemCount implementation. d3dx10: Add ID3DX10ThreadPump:AddWorkItem implementation. d3dx10: Add D3DX10CreateThreadPump stub. d3dx10/tests: Fix texture leak in check_resource_data.