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)
in g_hash_table_new_full()  is used as key_destroy_func: g_free()
The keys are allocated by malloc() so free() can used. And now is no heap damage.