backend: Avoid deprecated functions and set WAYLAND_DISPLAY in wayland
requested to merge sgn/thunar-archive-plugin:avoid-deprecated-gdk_screen_make_display_name into master
- gdk_screen_make_display_name is deprecated from 3.22
- This change also avoid a memory allocation and free cycle.