Move some code out of GtkHeaderBar and into a separate widget, making it reusable in process. See #2242