commandserver: rewrite protectio/restoreio to not depend on ui
Prepares for porting to utils.procutil, in which ui shouldn't be known.
ui.flush() is replaced with ui.fout.flush() since ui.ferr wasn't involved.
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: ForIndentation
BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
IncludeCategories:
- Regex: '^<'
Priority: 1
- Regex: '^"'
Priority: 2