Handle multibyte characters in source files better

Fixes an ICE when multibyte characters occur in files other than the crate file.

Makes spans containing multibyte characters slightly more correct (although still computed with codepoints, not graphemes, so not closing the issue).