Adopt the new I/O error handling techniques.

There are a couple of comparatively unrelated changes where
significant change was already necessary and rewriting it became a
better way, such as with ``common::read_{decimal, hexadecimal}`` where
I have since the original coding become aware of the checked
arithmetic traits.

This is not a minimal diff, because I was trying a few other things
with it in the process and when I reverted things I reverted them to
how I would write them *now* rather than how I wrote them *then* (e.g.
``<R: Reader>`` instead of ``<T: Reader>``, ``'a`` instead of ``'r``).