Add XDG Base Directory support
This code will check if the legacy directory exists; if not, it will create either $XDG_CONFIG_DIRECTORY/psensor/ or $HOME/.config/psensor/, and use that. If neither of these directories work, it will also fall back to $HOME/.psensor so there is no chance that this breaks anything.
In addition, lib/slog obeys whatever get_psensor_user_dir() returns, rather than having its own implementation for how to find the correct log file.