doWrite() now takes shared_ptrs at all levels

switched the IOHandle doWrite() and network write() to take a shared_ptr instead of a value, to save a copy