kcms/mouse: Don't crash when no supported backend is found
Original MR in !2089 (merged).
If InputBackend::implementation() and ConfigPlugin::implementation() can return a nullptr, we need to have null pointer checks where they get used.
Also, remove some dead code without these checks to avoid confusion.
(cherry picked from commit 130e3bb5)