The code had not been touched in a very long time and was overgrown
with weeds from pre-QPA times.
We no longer maintain an indirection through QSystemTrayIconSys,
which was a remnant from Qt 4 times.
The Objective-C helper class used for callbacks has been slimmed
down to just a simple delegate, with the actual work done in the
QCocoaSystemTrayIcon implementation, further reducing indirection.
We no longer use a custom NSView for the status bar item, something
that has been deprecated for a long time. Instead we set properties
on the NSStatusItem's button. This gives us automatic support for
drawing the icon with the right highlight, including in dark mode.
Finally, the code has been updated to modern Objective-C syntax.
Change-Id: I59706081f6b179035b8216a7a6ebc08a47cec127
Fixes: QTBUG-77189
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>