Automatic keyboard detection

[endlessm/eos-shell#3425]
These lines should be moved into a `keyboard_detector_clear()` that also gets called from `keyboard_detector_free()`