Many improvements to sheep/shepherd backend.

* The shepherd's code is now cleaner, easier to follow, and more
  stable.
* The shepherd and sheep now use heartbeats to detect when either go
  down. Recovery is not dealt with yet.
* Duplicated code throughout the project related to working with ZMQ
  has been consolodated into the base module.
* Everything is still highly unstable, getting better though.