global: testsuite/test_manage:run to base utils
- Renames run to run_py_func and adds documentation.
- Reverses type checking logic in run_py_func, as six.string_type should be more reliable than checking for list/tuples/what-have-you.
- BETTER Enhances run_py_func to be able to print both to some StringIO and to the terminal at the same time. This is enabled with the passthrough argument. It now also always returns stderr, deprecating the capture_stderr argument. The return value is now a namedtuple so that one can easily fetch the required value. Its arguments to a more natural order (name of the executable first and arguments afterwards.
- Uses run_py_func instead of calling invenio executables with os.system. This should yield native exception handling and slightly better performance.
Signed-off-by: Dimitrios Semitsoglou-Tsiapos <dsemitso@cern.ch>