Rework Popovers and Containers management
This is a significant overhaul of the memory/ownership/lifetime management relating to Popovers and Containers, with many fixes uncovered along the way.
Draft status since I need to come back to this and write a proper description. But the code is ready for review. See the (especially long) commit message for the rationale of all the changes.
When running, there should no longer be any messages like
Gtk-WARNING... Finalizing xxx but it still has children left:
when closing the app. This usually manifests as a crash in ASAN. This crash is more likely to happen after exercising various popovers.