Fix bug #18610 with crashes when visiting files with ESC and 8-bit bytes.

 src/coding.c (detect_coding_iso_2022): Set coding->rejected
 correctly when an invalid escape sequence is found.

 Backported from trunk.