add an interface for bulk sending stats

This change is motivated by a similar interface that @sophiaxc and I made for an internal project. The idea for that project was that each iteration of this loop was sending a lot of statsd metrics namespaced by the project name, and so an interface where the connection had the prefix and could do bulk sending of stats was a big improvement.