Don't add visual-wrap-prefix properties to unsafe multi-line display specs
This makes sure we don't interfere with other display specs, e.g. for
images displayed in 'image-mode' (bug#73600).
* lisp/visual-wrap.el (visual-wrap--safe-display-specs): New variable.
(visual-wrap--display-property-safe-p): New function.
(visual-wrap--apply-to-line): Use 'pos-eol'; we don't want to respect
field boundaries here.
(visual-wrap-prefix-function): Check for unsafe display properties at
the end of the line and skip past them if present.
* test/lisp/visual-wrap-tests.el: New test file.
(cherry picked from commit
8762f6c7c974d028816a74169e3d6fdecaec8d6d)