Add icon support for XWM
Commit 6b58ea8c added support for showing X11 client icons, by picking up the icon atom in XWM and creating a Cairo surface for them. Unfortunately the code had a few bugs - leaks and showing the incorrect icon sizes - which were partly fixed in d2cb711d, 9fe5d5fa, 4d1cd36c and bef76179, before the support was reverted in 0dc0df24 before the 4.0 release.
It would be nice to have this support there, using that commit and the following clean-ups as a base. There is also a patch from @derekf to try to pick the closest icon size to the target, but this needs some work as well.