relay: use splice_to_pipe() instead of open-coding the pipe loop