This MR is not to be merged (at least not now), but rather to discuss how optional GtkHeaderBar should be implemented in general in Xfce.
For the record: Connecting to "notify::gtk-dialogs-use-header" to change the GtkHeaderBar during runtime wont work. That would cause:
(xfce4-taskmanager:37947): Gtk-WARNING **: 23:43:38.309: gtk_window_set_titlebar() called on a realized window
... and the window is moved to the top-left corner of the screen.