Fixes a whole bunch of compiler warnings when built with VS2017. Most of these are small, local changes. Significant changes are:
- Changes the "PFX" format string macro from %x-based to %p-based, in order to support enabling format string warnings. This is now possible because on Windows we use our own printing code, rather than the ntdll code, making the %p style consistent across platforms. We do not make this change for native test apps, to avoid breaking the golden output.
- Updates the minimum CMake version to 3.7 (the min for VS2017).
Changing Travis to use VS2017 will be done separately.
Issue: #2924 (closed) Issue: #1893