Workaround: do not iterate through input devices when destroying

TEMPORARY FIX ! In some cases, when destroying a widget or a window,
toytoolkit tries to get the input device which is "focused" to this
widget or window ; but it may try if the input device list is
empty or incorrectly filled. *TODO* proper check

Change-Id: Ibf100bde3842b5e8dd8e10cbaeb81f0a12545374
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>