Read async the stdout and stderr of a process while providing input data to it. Closes #1643.