Dump ObjectSpace stats of an Agent to the log.

This simply counts the objects in the ObjectSpace and orders them by the
count. There is also a smithctl command to actually do the dump.
Refactor message replies.

Instead of having a different method (publish_and_receive) the api
exposes a on_reply method which sets everything up for the proper
replying of messages.

This improves things in two ways a) the api is much cleaner: there is
only one publish method and b) the reply queue is set up once and used
multiple times. This is a significant performance benefit, not to
mention a better use of resources in general.

This is still a work in progress but the main functionality is there. I
still need to sort out the message_id/correlation_id matching is going
to work. There is a half backed attempt in there at the moment but it
won't work.
Update TestAgent to use the new reply code.
Move timeout & cancel_timeout into Sender.
Minor refactor. Use metadata instead of @metadata.

This is more consistent with the rest of the class.
_publish is now responsible for setting the message type.
Spell denormalised properly.
MessageFactory.

Instead of trying to put everything in the Payload class use a factory.
This removes all the special cases that need to be hacked when creating
payloads (eg nested ACLs).
Add to hash & rename as_json to_json.
WIP butchery
Finally fix sender and reply API.

Ok. I think I've got it! I've reverted back to the repy callback as I
think this is probably the least confusing.

For every message sent the sender keeps track of the message_id and
matches it against the correlation_id in the reply.

This is still very raw but I'm really hoping this will be the last API
change.
Convenience method to get the hostname.
Update todo list.
Complete rewrite of the messaging subsystem.

The main change behind this patch is that queues/exchanges now their own
channel instead of sharing one. There are knock on effects of this, for
example non-ack'ed message does not block messages to other queues &
prefetch can be used on a per queue basis (wild applause).

I've also changed the implementation of reply queues which fixes the
resource leak that used to happen when replying. A reply message type
can also be specified (the reply type was always default before).

The code is much simplified and there is an API change which I think
makes the overall API more consistent.
Update todo list.
Internal rework to use the updated messaging API.

This is mostly a WIP commit. There is lots of duplication and commented
out code that needs to be fixed but the basic functionality is there.
Expect some future refactoring.
Update the commands to use the API.

I've also made a number of improvements/bug fixes:

* push. Not reads STDIN a line at a time instead of everyting. Meaning it
  can handle any number of messages being piped to it.
* pop. Has been completely reworked and doesn't hang if the number of
  messages to be pop'ed is greater than the number of messages on the
  queue. It will also print the number of messages specified without the
  --remove option.
* firehose. A new command that reads from the rabbitmq firehose. See
  http://next.rabbitmq.com/firehose.html for more details.

I've also added a return ACL instead of shoving everything into the
default ACL.
Rename acls to acl
Add --reply option to push.

Sets up a reply queue for when a message is sent to a queue that will
get replied to.
Update ConfigAgent with new api.