Implement stat export csv/json/bbCode.

closes #16