Move some code out of GtkHeaderBar and into a separate widget, making it reusable in process. See https://gitlab.gnome.org/GNOME/gtk/issues/2242