$XDG_CONFIG_DIR and a bit of code reorganisation

Here is support for linking `<app>/<foo>.config` → `$XDG_CONFIG_DIR/<app>/<foo>`. If you really don't like the idea of XDG, at least now you know where to get it once you decide you want it ;).
I hope you can merge all the commits except for the last one anyway.

I tried to make all the changes in a number of small steps easy to verify by eyes. I also did some testing this time :cat:.