Implement the debugstatus package.

Abstract out some helper functions to be used in the charm store and similar services.

(Review request: http://reviews.vapour.ws/r/628/)
let's add a static check that the Pinger and Collector interfaces are satisfied by the mgo types they're expected to be used for.

   var (
      _ Collector = (*mgo.Database)(nil)
      _ Pinger = (*mgo.Session)(nil)
    )