Fix hang in utilities::Formatter::Replace()

When the replacement of a single formatting directive (other than
a plain %s, which is special-cased) resulted in more than 1024
characters of output, a buffer reallocation mechanism kicked in,
that was quite completely broken.

The buffer was reallocated, but the variable holding the length
of the buffer was not updated, so the next attempt at generating
the output into the buffer would effectively have the same amount
of buffer available, and would thus fail the same way.