Major cleanup of build infrastructure

This commit cleans up the build infrastructure by porting existing build
mechanisms to cmake. This also fixes compiler warnings in varintgb.h and
the incorrect namespace used in horizontalbitbacking.cpp.
MSVC support added

Modified Cmakelists.txt to properly generate MSVC project files and make
sure things compile and unit test runs properly on MSVC'13
Merge pull request #17 from mpetri/master

Build System cleanup and fixes