mft: add Direct3D11 output support
DXVA is not used unless the output is in Direct3D textures (D3D9, D3D11 and D3D12).
Switch the module to C++ for more convenient coding and even includes that don't compile correctly in C.
The Media Foundation is released asynchronously with the last picture sent to display.