Refactor, encapsulate format-specific code in objects

It was a nightmare having the CSV and Excel code scattered in amongst the logic of retrieving and saving rows. I've made two objects which implement the same "interface" (namely **add_table**, **write_rows** and **finalise**). 

You can follow the main program flow now, and all the nitty gritty about how to do each type is handled inside the outputter object.