smartcard: detect explicit cancelation explicitly

If the the smartcard function has been cancelled (because,
say, g-s-d is shutting down), handle that case explicitly,
so the right error message is propagated.
smartcard: filter out spurious errors

Some PKCS11 modules send spurious errors when the card is first
powered on.  This commit works around that problem by adding
retries.

This brings us back to status quo with the old smartcard plugin.
keyboard: Move code to get the XkbRF_VarDefsRec here

GnomeXkbInfo needs to drop its X dependency to be used on a wayland
compositor gnome-shell and in that case the xkb data path is an
implementation detail.

This g-s-d plugin will still be used on X only setups so we'll move
the code here.

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