treemodelfilter: rework reference counting
treemodelfilter: rework reference counting

 - Before we kept a reference on all nodes in non-root levels.  This has
   been changed, now we keep a reference on the first node of each level.
   If, due to changes in the model, another node becomes the first node in
   the level, the reference is transferred to this new first node.
 - All non-root levels keep a reference on their parent.
 - By making use of the external ref count, the filter model now emits less
   unnecessary signals.
 - GtkTreeModelFilter does support filter functions which decide visibility
   of a given node based on the number of or visibility of children.
   To accomplish this, a child level of a node is cached when its
   parent has an external ref count > 0, because changes to the node might
   affect this parent.
 - An optimization for not building the root level in case the inserted
   node is not visible in gtk_tree_model_filter_row_inserted() has been
   removed.  In this case, we still need to build the root level and
   possibly a child level to monitor for signals which might make
   this row visible.

Lyude/gtk-,msteinert/gtk,ebassi/gtk,jessevdk/gtk,ahodesuka/gtk,Lyude/gtk-,jessevdk/gtk,Sidnioulz/SandboxGtk,ahodesuka/gtk,alexlarsson/gtk,chergert/gtk,grubersjoe/adwaita,alexlarsson/gtk,davidt/gtk,Lyude/gtk-,Distrotech/gtk2,davidt/gtk,jigpu/gtk,Lyude/gtk-,davidgumberg/gtk,grubersjoe/adwaita,ebassi/gtk,alexlarsson/gtk,jigpu/gtk,grubersjoe/adwaita,bratsche/gtk-,ahodesuka/gtk,ahodesuka/gtk,Adamovskiy/gtk,davidgumberg/gtk,jigpu/gtk,ebassi/gtk,davidgumberg/gtk,jadahl/gtk,Adamovskiy/gtk,Lyude/gtk-,Adamovskiy/gtk,Lyude/gtk-,Distrotech/gtk2,jessevdk/gtk,alexlarsson/gtk,jadahl/gtk,alexlarsson/gtk,Adamovskiy/gtk,alexlarsson/gtk,jessevdk/gtk,davidgumberg/gtk,chergert/gtk,davidt/gtk,Adamovskiy/gtk,ahodesuka/gtk,chergert/gtk,jigpu/gtk,chergert/gtk,jigpu/gtk,msteinert/gtk,alexlarsson/gtk,chergert/gtk,bratsche/gtk-,ahodesuka/gtk,ahodesuka/gtk,davidgumberg/gtk,Adamovskiy/gtk,jigpu/gtk,bratsche/gtk-,Distrotech/gtk2,msteinert/gtk,Distrotech/gtk2,msteinert/gtk,Adamovskiy/gtk,davidt/gtk,Adamovskiy/gtk,Distrotech/gtk2,jadahl/gtk,ahodesuka/gtk,jadahl/gtk,Sidnioulz/SandboxGtk,Sidnioulz/SandboxGtk,grubersjoe/adwaita,davidgumberg/gtk,msteinert/gtk,jigpu/gtk,davidgumberg/gtk,jessevdk/gtk,davidt/gtk,chergert/gtk,alexlarsson/gtk,Distrotech/gtk2,jadahl/gtk,chergert/gtk,jessevdk/gtk,davidt/gtk,grubersjoe/adwaita,Sidnioulz/SandboxGtk,ebassi/gtk,jadahl/gtk,bratsche/gtk-,ebassi/gtk,grubersjoe/adwaita,msteinert/gtk,bratsche/gtk-,jigpu/gtk,jessevdk/gtk,chergert/gtk,ebassi/gtk,jadahl/gtk,grubersjoe/adwaita,Sidnioulz/SandboxGtk,Lyude/gtk-,davidgumberg/gtk,bratsche/gtk-,Lyude/gtk-,grubersjoe/adwaita,Sidnioulz/SandboxGtk,jadahl/gtk