Visual Studio 2013

Modifications to compile in Visual Studio 2013 as C++ on Windows: many type casts, avoid C++ reserved words, win replacement for new used unix functions.
TODO: rrtool graph throw an exception in grrd_graph.c.
temporaray I commented out the line with exception : g_hash_table_destroy(im->rrd_map)
oh, that would be awesome. the other option would be to make the code conditional on NOT being compiled on windows