ZMQ_CONNECT_RID tests and man

Added tests and man entry for ZMQ_CONNECT_RID.  Fixed several critical bugs and handled cases for duplicate peer id assignment.