Fix msvc-14 warnings, and correct use of tolerances exposed by msvc-14 testing.