(maint) Add execution::each_line for efficiently processing output.

Currently, execute() buffers the entire output from the child process.
Sometimes the resulting string is passed directly to the each_line that
takes a string.

To improve efficiency, this commit implements an execution::each_line
function that passes each line of output to a callback function without
buffering the entire output.

Additionally, when the callback function returns false to indicate it is
done processing the child process outpout, we close the read pipe. This
in turn may signal SIGPIPE in the child process so that it exits sooner.