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.
tmeporaray I commented out the line with exception : g_hash_table_destroy(im->rrd_map)