Fix insert-file-contents overlap check
In commit
61a8ce0280668980a4452b112103c9bc879e1f49 I mistakenly
focused on overlap in the buffer. The code also needs to check
for overlap in the inserted file data.
Problem reported by Gerd Möllmann (Bug#79020).
* src/fileio.c (Finsert_file_contents): Prevent overlap in both
the buffer head and tail, and in the inserted file’s head and tail.
Also, shrink the file’s head if the file shrank to be smaller
than its head.
(cherry picked from commit
42548c25f74d4509a1d29cb419e1b2f7b4a12c10)