Buffer linter logs, emit JSON as output and output at the end of request

* added a generic "end/response" log event, this is not linter specific.
* made linter emit JSON as output
* fixed a bug in fostered content logging

Change-Id: I1111c626330c1c0540661b7bd82fc2da02b356ea
Merge "Buffer linter logs, emit JSON as output and output at the end of request"