a file-like stream with StringIO redirection

this StringStream will support to redirect stdout
or stderr to StringIO so that it can be read later

Signed-off-by: Gui Chen <gui.chen@intel.com>