Init draft to make socks use refactored_pipeline.
Fixed race cond bug when setting `Stream.stream_id`.
Sent recived data to socks instead of terminal.
Prevented `closeStreamFromSocks()` from being called before it is set.
fix various bugs in circuit.py and stream.py
Merge branch 'refactor_pipeline_socks' into pipeline_refactoring