hook: do not redirect stdout/err/in to ui while running in-process hooks (BC)
It was introduced by
a59058fd074a to address command-server issues. After
that, I've made a complete fix by
69f86b937035, so we don't need to replace
sys.stdio objects to protect the IPC channels.
This change means we no longer see data written to sys.stdout/err by an
in-process hook on command server. I think that's okay because the canonical
way is to use ui functions and in-process hooks should respect the Mercurial
API.
This will help Python 3 porting, where sys.stdout is TextIO but ui.fout is
BytesIO.