Bug 40068: Use Capture::Tiny instead of IO::CaptureOutput
The IO::CaptureOutput perl module is deprecated, so we switch to Capture::Tiny.
The Capture::Tiny module does not provide a capture_exec function similar to the one from IO::CaptureOutput, so we implement one using the same name, which avoids changing all the places where we were using it.
I've tested basic functionalities with those changes, and it seems to be still working.