ui: proxy protect/restorestdio() calls to update internal flag
It should be better to manage the redirection flag solely by the ui class.
ui: move protectedstdio() context manager from procutil
This is a follow-up series for
23a00bc90a3c, "chgserver: do not send system()
back to client if stdio redirected." The function is renamed using ui terms.