This series implements an idea from Paolo to introduce flow control in the char layer by converting all char backends to use GIOChannels internally. Then we can just use the existing IO watch support in glib to implement flow control.
This is based on a rebased version of an old series of mine plus a number of improvements from Amit Shah.