Add pushgateway support to the simpleclient.

Refactor production of the text format into a separate module.
Merge pull request #42 from brian-brazil/pushgateway

Add pushgateway support to the simpleclient.