Changes to stats output

Truncate file when logshifter starts, instead of before writing each
stats interval.

Output JSON instead of multiple lines per interval.
Merge pull request #3 from ncdc/append-stats

Changes to stats output