smartcard: manually emit insertion event at startup
At the moment we rely on getting an insertion event for any already
inserted smartcards at startup time, from NSS. That apparently doesn't
happen for all drivers, though.
This commit changes things up a bit so that we do the insertion event
ourselves, and additionally add some guard code to prevent spurious
insertion events from being emitted.
xrandr: Avoid crash when Fn+F7 is pressed on some systems
When a display driver doesn't support XRandR properly,
manager->priv->rw_screen will be NULL. However, because of the way that
we need to initialise D-Bus, some of the API is still accessible.
As such, the "Fn+F7" (update screen) shortcut would access API that
should only be accessible when XRandR is available. Add guards to those
functions.