Get cmake build working with visual studio 2013

Important changes:
* Adjustments to the c++11 stuff, which msvc objected to
* Use inline ASM (for msvc) and the cpuid.h header (for gcc/clang) to get sse support info.  I verified in the debugger that 32-bit builds are still correctly registering the presence of SSE.  ATM, I don't have a machine without SSE to test the opposite.
* Use cmake find_package for zlib dependency (the location can then be adjusted by the ZLIB_ROOT cmake variable)

Ancillary changes:
* Allow passing flags to the ci.sh script (this mimics setting the environment variable before Seth's changes)
* Fix __STRICT_ANSI__ mingw math.h, which I think stem from the -std=c++0x option
* Use vm:: on dup and dup2, which can (at least on i386 mavericks) also refer to the system calls
* Check for _WIN32 rather than WIN32, as the former is no longer recognized in c++11 mode on mingw.


search-and-replace fail