dxva2: change the order how DXVA2 resources are destructed

Additionally, use ReleaseFrame to release the frames in the frame queue.
This ensures all resources are released, and nothing leaks.
dxva2: free the old frame only after we're done with it
dxva2: keep a reference to the d3d surface while its used by the decoder
Reset frame stride before allocating buffers.
dxva2: remove unused function