Clean up build warnings.
Move /MT and STL debugging flags to only be enabled when building for unit tests, since they affect linking ABI and can leak to user projects if they're using CMake.