SubProcess: Avoid buffer corruption when calling err()
Some code like crush/CrushTester.cc, uses err() to get the output status of a
spawned command.
As per reported in bug #15011, some tests were failing because of some utf8
decoding issues. The implied buffers were generated by the output of err()
function of SubProcess.
err() is returning the str().c_str() value of 'errstr' object which is not
living much longer that the function itself.
This patch returns a std::string to avoid the temporary allocation and fixes
the associated err() calls accordingly.
Since this commit, the make check is now passing everytime.