Visualizer

@rcrichton this is the visualizer and metrics code from the South African work.

It's pretty generic though and so I feel it would be good to get these changes into develop/master.