Adapt the "._initialized" pattern for Producers.

The moksha consumers have a pattern where if the user's consumer does
not successfully call super(..., self).__init__(hub), then our
moksha.hub.api.Consumer base class never gets the opportunity to set an
`self._initialized` flag to True.  The moksha-hub looks for this flag
after it tries to initialize the consumers, and if it is absent it takes
note.

This is useful for consumers that want to decide if they should be
enabled or not.  In fedmsg for instance, we want some consumers only to
load if certain config variables are present.

This commit adapts that same logic to the Producers so they can take
advantage of the same process.
Make our consumers and producers JSON serializable.

Well... kinda.  Its not like the consumers/producers are really able to
be serialized and reconstituted, but here we add facilities to serialize
metadata *about* those consumers/producers.

This will ultimately be used to log data about the internal status and
health of a running moksha-hub.
Add a new MonitoringProducer.

It is a polling producer that writes to a typically local zmq PUB socket
(although it could be exposed over the network with a config value
change).

We can use this for nagios and collectd health checks.

- Nagios would probably look for the 'initialized' flag on certain
  consumers or producers.  "Did datanommer load correctly?"
- Collectd would probably look for future statistics that we don't yet
  have stuffed into the monitoring messages.
Some pep8.
Track a count of exceptions and log to monitoring.

This will count the number of exceptions hit in a row and write that
count out with each poll to the monitoring socket.

This will be useful for a nagios check.  Sometimes, fedmsg consumers
will start raising an exception for every message they receive.  This is
typically due to a restart of our db host:  our fedmsg consumers are not
smart and they don't know how to reconnect smoothly.  They need to be
restarted.

By keeping this exception count stat, we'll be able to easily see when
that occurs and respond appropriately.
Merge pull request #11 from mokshaproject/feature/query-socket

Add a local socket broadcasting hub health stats.