[gtk3] Cherry-pick gtkfilechoosernativeportal fixes from gtk4
This was basically done copying the gtk4 version and keeping the changes that weren't gtk4 specific.
Fixes #6224 (the chooser doesn't close but we don't crash or such)
This was basically done copying the gtk4 version and keeping the changes that weren't gtk4 specific.
Fixes #6224 (the chooser doesn't close but we don't crash or such)