htmlreport: fix #5998, crash on some files with "UnicodeDecodeError".
For those files that we can't decode, don't generate a html-preview but note into index.html that we couldn't process the file.
At the end, summarize on which files we failed and suggest using --source-encoding option.