For the most part, c_str() is just used for "%s" in warnings, errors,
and debug messages. We can afford to pay the cost of to_string() there,
while allowing string_ref to share memory the rest of the time.
NB: when using `to_string().c_str()`, it's important not to let that
pointer outlive the string temporary! It's good only for the range of
its full expression; if you need it longer, bind the string to a local
reference first.