Format into small c files to be used by different transports.

This pulls to_json out from zeromq.
removing completely unused file analysisd/alerts/mail.c
Merge pull request #440 from jrossi/format-stuff

Format breakout format options into small bit of code