Prevent further cases of duplicated separators in context menus
In some cases, context menu items are added before the overall prompt
string. This could cause multiple consecutive separators to appear if
they "surround" the prompt string. (Bug#52293)
* lisp/mouse.el (context-menu-map): Improve the de-duplication logic
to ignore non-menu-items when checking for consecutive separators.
* test/lisp/mouse-tests.el
(context-menu-map-remove-consecutive-separators)
(context-menu-map-remove-separators-at-beginning-or-end): New tests.