Socketworks

Major refactoring that unifies 0MQ uses under an internal API and should enable us to proceed with unification of persistence layers.