OrchidSocketImpl: don't hold the stream lock whilst calling into stream.

I tried to minimise whitespace changes but tabs are a pain ... perhaps we should just untabify the whole codebase. It can always be retabified later if we decide to merge back with upstream.