Initial work on CVS export. Not working yet.
Get report creation working again, with CSV export

exportcsv.php is new, the reports page now has an Export CSV button.
It exports all reports as a CSV file.