make iostream multiprocessing aware

Fix #2438 and #2422
Old iostream will segfault on multiprocessing like this since it tries to reuse zmq socket

```python
import multiprocessing as mp
def f(x):
    print 'hello',x
pool = [mp.Process(target=f,args=(i,)) for i in range(10)]
for p in pool: p.start()
for p in pool: p.join()
```