context-menu: Remove trailing and leading separators when not required.
context-menu: Remove trailing and leading separators when not required.

Fixes: #979.
zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop