feature: Prepare metrics for heka.

* Send metrics to stderr after flattening/formatting.

issue #1190
Clean up metrics based on @kparlante's suggestions.

* Add additional fields to logged metrics: lang,  hostname, pid, v, agent.
* Rename `time` to `date`
* Update tests.
Change `date` to `time`. Thanks @pdehaan for catching the error!
Store event data in two arrays, `events` and `event_durations`
Set `context` to `web` and `service` to `none` if not specified.

Simplify copying of fields.
Merge pull request #1223 from shane-tomlinson/issue-1190-enable-metrics

WIP feature: send metrics to stderr for heka to listen on.

kparlante says: 

> yeah, I'd go ahead and merge

Merging. Thanks @kparlante!