Add string_device. Add 'tied' field to device.

If this field is true, all output buffers for this device must be
flushed when it's read from.
Fix string_device. exception uses io now.
io.printer/scanner is given parsed string. Other stuff.