Fix compilation with -O2 on Windows
Use -O0 for developer configuration instead of -Og

-Og makes debugging a bit harder than -O0 as some optimizations lead to
absence of ability to view value of a variable after some point in code
(e.g. it can be viewed two lines above, but not at current position).
Move CFLAGS update below in configure script

Otherwise it affects checks performed by autotools.
Merge branch 'a-couple-of-build-fixes'

Use -O0 instead of -Og for development.

Fix build with -O2 on Windows.

Move CFLAGS modification for development purposes to the very bottom
of the configure.