scanner: avoid backtracking where possible
scanner: avoid backtracking where possible

Instead of peeking at characters and then reading them again, read them
once and pass them to the relevant function.  This is a step towards
replacing our dependency on io.RuneScanner with just io.Reader which is
more widely implemented.

amalog/go