Added gitignore.
Reorganize cmake files to build separately lib and tests.
Added Visual Studio support (only for lib) (tested with VS 2012).