call_shell: Use a callback with get_cmd_output.
doxygen: do_shell()
call_shell: Add callback to do_shell()
call_shell: Use a callback for "diff" output.

Make read_diff() reentrant by locallizing its variables and storing the
ones that persist in a structure. Use it as a callback.
call_shell: Add input/input_len parameters.

Change write_selection() to save_selection().
call_shell: Remove unnecessary `reading` variable from `ProcessData`

See #980.