Provide a size aware buffer to be used in our non blocking `popen`.

Contents are stored up to a specific size. If more is needed, the internal buffer gets switched by a temporary file.
No need to over complicate. `tempfile.SpooledTemporaryFile()` to the rescue.
Remove unused import.
Merge pull request #5800 from s0undt3ch/features/subprocess-buffer

Provide a size aware buffer to be used in our non blocking `popen`.