Handler returned by createMenuDismissHandler. Call attach()
once per menu open; invoke the returned teardown on close.
Source observation runs through
CngxMenuDismissHandlerOptions.onDismiss; the handler exposes
no reactive state of its own so the trigger directive can store it as
a plain field rather than a signal (avoids a signal write inside the
isOpen effect).
Install the listeners enabled by the options. Returns a teardown
closure that removes every installed listener. Each attach() must
be balanced by exactly one teardown call.