Cleaner ghost reporting
Rework encoding detection to not slice at byte level

Also warn about low-confidence guesses.

The previous code would potentially truncate a multibyte
character.  Don't know if it happened, because the chardet
fallback was still likely to work.