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
PHPROJEKT-157: Database for project managers
remove debugger;
Merge pull request #355 from dsp/dsp/PTC-157

PHPROJEKT-157: Database for project managers
Fix typo in SQL
Fix SQL string creation for create table statements

In certain situation it was possible that an additional , was created
at the end of the string that lead to a SQL syntax error. This can
be avoided by generating the string by imploding an array of strings.
Therefore we rewrite parts SQL string generation in order to create
a proper SQL statement.
Merge pull request #353 from dsp/dsp/fix-sql-statements

Fix sql statements
use single quotation marks consistently
use the css class "button" instead of "submitButton" for our buttons
Fix an error in Project/Sql/Db.json

The format is actually version->"initialData"->table name->array of operations
Merge pull request #358 from voidus/fixSqlJson

Fix an error in Project/Sql/Db.json
Merge pull request #351 from voidus/export

Added an export form to the statistics page
Merge branch 'next' into PTC-161

Conflicts:
	phprojekt/htdocs/phpr/StatisticsView.js
	phprojekt/htdocs/phpr/template/statisticsView.html