The helper functions date back to a time when AppButton and WindowButton were unconnected classes. But nowadays they share a common base class, so we have a better place for them than external helper functions. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/180>