details: Don't crash on Wayland

We were just assuming that there is an X server around. This may
not be the case anymore, so check, and deal with running under
Wayland. For now, we just say 'Wayland'. We should do better here,
eventually.

https://bugzilla.gnome.org/show_bug.cgi?id=728672
Followup cleanup

Ifdef the functions too, otherwise they will cause the compiler
to complain about unused statics when building without X.

https://bugzilla.gnome.org/show_bug.cgi?id=728672
Don't parse Xorg.log

Parsing Xorg.log is of dubious usefulness, and the code is likely
not working anymore anyway, because the logs may well go to the
systemd journal nowadays. Just drop this.

https://bugzilla.gnome.org/show_bug.cgi?id=728672