Make sure XDG_RUNTIME_DIR is set in login scripts.

Fall back to $XDG_CACHE_HOME or else $HOME/.cache, same as GLib.