Henri Verbeet : d3d: Make sure the device is properly released when exiting the tests.