Another massive refactor of graph.cgi
Another massive refactor of graph.cgi

This shouldn't change any behavior but the graph generator is now a
self-contained class so it is easier to use for other purposes.

marineam/nagcat,marineam/nagcat,marineam/nagcat