Implement configurable namespaces

this pull request merges in lambdafu's configurable namespaces patch (which follows the implementation from etsy's statsd), and keep the iterator changes to support python3.

Basic testing has been done, but more is likely needed.