Move remote-memcpy helper into Task.

#801 / #802