The implementation of raw_string_ostream::write_impl() was moved to raw_socket_stream.cpp when the raw_socket_ostream support was separated. This patch moves it back to facilitate disabling socket support in downstream projects.
Move the implementation of raw_socket_stream from raw_ostream.h/cpp to raw_socket_stream.h/cpp as requested in #73603.