json-http: refactoring output code

Splits the output code in two public functions and permits
to call them from the alert function
json-alert: include HTTP info on the alerts

Extends the JSON alert output to include the HTTP data
at the time of the alert.