xinput2_device_is_pen() was testing against default-zero values
in the X11 Atom cache on at least the first round of
detections, leading to imprecise detection.
The patch fixes two aspects of initialisation:
1. Ensure that the selector cache is always initialised in
xinput2_device_is_pen().
2. Ensure that all X11 Atoms used in SDL_x11pen.c are instantiated if
missing. This ensures that they are never None and avoids potential
failures to detect hot-plugged tablet devices.
Acknowledgements: @tilman3 for narrowing down the issue and an
initial fix