This provides more control over how the selected item is shown in the entry. Bug #631167
This helps prevent accidents with GTK_PATH.
At the same time, introduce a gtkmainprivate.h header and various other cleanups. Based on a patch by Tadej Borovšak. https://bugzilla.gnome.org/show_bug.cgi?id=617471