ZeroMQ refactor of socket creation

Please do not merge this. This is only for exploring current issues.