Improved multi-platform compatibility

Improved multi-platform compatibility by removing dependence on POSIX sys/time.h (using the C++11 std library instead), adding support for multiple compilers in CMakeLists.txt. Also fixed the warnings the MSVC compiler gave me (except the safety warnings for strncpy, etc).

Please note, while it now natively supports MSVC, I didn't update the existing solution, so it still doesn't work (its referencing the wrong files). However, you can tell cmake to build a solution and project files for you (which should be the action cmake defaults to when run without arguments on a windows system with VS installed)