Windows compilation

This pull requests clean slightly the cmake files for windows. It removes references to hulamemmgr which is not needed. It also removes unnecessary libs (pthread, openssl )

A new mode also allows to compile as static lib ( important for platform that does not support shared lib, e.g iOs )

Finally, fixes a small issue in the cli under windows