Closes #41373 Release Notes: - Ensures that XDG specs are followed on MacOS and Linux with backwards compatibility. Changes -Added ```state_dir``` to get XDG_STATE_HOME on macos and linux, no change to windows. -Changed ```text_threads_dir``` to a fallback, ```text_threads_dir_fallback``` -Re-implemented ```text_threads_dir``` to use ```state_dir``` --------- Co-authored-by: AdamJedl <100023363+AdamJedl@users.noreply.github.com>