On windows, get rid of crt security warnings
Killed a bunch of warnings in vc++ 2013

The examples are warning-free, but some library files still have warnings that are nontrivial to fix.