set defaults for changed files

when a commit was empty, e.g. merge commit, there will be no changed
files and hence no values for the test code ratio. no values for the
ratio means any calculations done in JS will cause NAN results. this
causes errors when rendering charts, for instance in the bar chart all
bars had the same height.
simplified git output format and parsing

Git show can take a format parameter.This can be used to tailor the
output to our needs, thereby simplifying the parsing.
fix incorrect headers

in order for PHP to actually send status headers, they have to be
written differently. Changing the headers now so a 500 actually does
cause a 500 in the http response.
adding momentjs

adding momentjs as a library to ease handling dates because JavaScript
dates are stupid and cumbersome to work with.
add error handling

when errors occur while fetching results, there is no visual indication.
A user would have to check the console. Adding simple error notification
through an alert box.
fix commit mapping

because I have simplified parsing, we no longer need to do additional
string splitting or matching on the author and message data. Keeping
this actually led to an error.
add dynamic timePeriod depending on commit time

I had the labels on the axis set to d3.time.days. This renders one day
per day between the last and first commit. This means, if your repo has
two commits, one from 2014-01-01 and one from 2013-01-01 you get 365
days rendered on the time axis This is barely readable.

I added some logic to determine the days between the first and last
commit and compare then to the available width on the chart. If that
would make for a crowded time axis, I am changing the timePeriod to
weeks or months or years, depending on the amount.