Make external monitoring possible.

@jcappaert @marshall 

I need access to some internal data structures so I can monitor leaks and connections.