[libbase] Pipe: some documentation plus a fix in pipe.write(socket, n)