kcms/tablet: Some more safety rails
David hit a crash somehow (!1833 (comment 1039571)), so I added more guard rails to maybe stop that from happening. This includes a couple of asserts, preventing a possible OOB, and ensure the calibration window closes with the device is removed.