Modification to make nupic.core more friendly to Windows

It's a PR to track the work on #103 , I don't know if it would get `nupic.core` build under Windows in the end, but I can definitely fix some obvious unfriendly part.

The primary goal for this PR is:

* make CMake deal with compiler flags in a more cross-compiler way(mostly make it firendly to MSVC)
* make platform-specific codes deal with MinGW/Cygwin/MSVC separately 

This is not finished and please do not merge yet.
Yes we can eremove it. I left here because I didn't know when it was in and wanted to remain backward compatibility somehow, but soon I found out that it's just brought in by #107 .