d3dx9/tests: Clean up device state after tests.