CSV Export - adds referrer

This make the CSV export much much more useful being that it will now have the referrer_id. Now you can just open the CSV in a spreadsheet or processing script and do all the calculations for user earnings.

To note: CSV is the only exportable format that gives you 10,000 rows. Both JSON and XML are limited to 30, so CSV is the most important format to export all the details to.
Much cleaner now

I thought this gave me an error before, but I've tested it out and it works fine.
Merge pull request #16 from cpres/patch-2

CSV Export - adds referrer