cmake: Fix CMP0043 violations.
cmake: Improve DirectX detection.

Based from apitrace-tests change.
Add support for a bunch of DXGI 1.2 interfaces
dxgiretrace: Adjust sideeffects flag.