Fix to clear writeBuffer per BufferSink#transferTo()

The writeBuffer is actually thread local, so it must be cleared
by BufferSink#transferTo().
Fix return value type of TaskLoop.Task#execute()

The return value prepresents the minimum time to wait for timeout
in TaskLoop#process().