Add need_task_ids to emit for bolts/spouts

Default is True, if False is specified, we don’t try to read task_ids
and tell storm not to send them. Simplifies logic of BatchingBolt.emit
and added BatchingBolt.emit_many override.
Make stdin/stdout reading/writing thread safe

RLocks make sense here as so long as we have the same thread trying to
read and write lines, we should be fine