add threadsafe switch to ZMQStream
add threadsafe switch to ZMQStream

wraps any calls to io_loop API in add_callback, which is the only thread safe method on the IOLoop object.  This can introduce delays in the events for code under heavy load, but they should have minimal effect, as the same delays would affect the handling of the events in the same way they affect the registration thereof.

Off by default, so existing code will see no changes.
caidongyun/pyzmq,Mustard-Systems-Ltd/pyzmq,swn1/pyzmq,yyt030/pyzmq,ArvinPan/pyzmq,Mustard-Systems-Ltd/pyzmq,dash-dash/pyzmq,Mustard-Systems-Ltd/pyzmq,swn1/pyzmq,swn1/pyzmq,yyt030/pyzmq,ArvinPan/pyzmq,caidongyun/pyzmq,dash-dash/pyzmq,ArvinPan/pyzmq,caidongyun/pyzmq,yyt030/pyzmq,dash-dash/pyzmq