Add debug output for input method related events.

Task-number: QTBUG-40402
Change-Id: Ide96588488eb6d95f4c39f3da749d301d9ec858e
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>