Change optimization level in GCC.

Added code to automatically change the optimization level for GCC to
-Ofast, which adds some non-standards compliant optimizations.
Add fast math to MSVC compilation.

Changed compiler flags for Release builds in MSVC to include the fast
math option.