Make TextWriter usable with `write!` (i.e. add a `write_fmt` method).