ability to export stats using statsD for monitoring in graphite etc

ok, opened a new pull request as I messed up sqashing commits. Here you go @pgarbacki