A major limitation of iostream is that you can't have reads or writes with a safe interrupt. Instead rewrite the interface with Linux ppoll so that these can be safely interrupted with a signal and return early.
This follows discussions from #3413. Followup commits add clang-format file, script and blame ignore lists.
Only used by GDBServer. NFC.