Use the zend context switching helper to deliver json

This will allow us to add csv later.
Zend doesn't allow setting a default context, so we just set the format
parameter if it's not provided by the client to do that.
Generate the json in a view.

We mustn't deactivate the view renderer and convert to json in a view script to
use the contexts for other formats
Add a csv context.

Now ?format=csv will result in a csv download.
This commit includes a view script to convert to csv.
added an export form to the statistics page
remove debugger;
use single quotation marks consistently
use the css class "button" instead of "submitButton" for our buttons
Merge pull request #351 from voidus/export

Added an export form to the statistics page