Portability overhaul (no functionality changes)

* Created CMake build system for library and apps
* Separated functions out into more traditional library,app,header locations
* Compatible with GCC and MSVC
* Can detect if it's part of a larger build, only builds library in that case
Updated README to reflect CMake build system and removed commented code
Fixed README typo