Fixed mem_ostream::get_shared_buffer()

Creating  shared_buffer with shared data of mem_ostream::buf  instead of copying them into a new buffer.
Merge pull request #10 from pmed/mem_ostream-fix

Fixed mem_ostream::get_shared_buffer()