mft: refactor code and add hardware encoder
The refactoring makes the D3D code more modular, split the audio and video parts.
The audio and video work with hardware and software encoders. For now hardware (D3D11) sources go through the GPU before being fed to the encoder. But we do get the benefit of the hardware encoder and decoder for the heavy stuff.