Fix kate inputMethod query for Qt:ImCursorPosition and Qt:ImAnchorPosition
Fix kate inputMethod query for Qt:ImCursorPosition and Qt:ImAnchorPosition

Current kate implementation for Qt:ImCursorPosition and Qt:ImAnchorPosition
is not correct. Qt:ImCursorPosition should always return the correct position
of cursor position of Qt::ImSurroundingText. Qt:ImAnchorPosition should return
the anchorPosition of selection, when in different line of cursor or there
is no selection, return the same position of cursor.

REVIEW: 104788

hlamer/kate,jfmcarreira/kate,cmacq2/kate,hlamer/kate,cmacq2/kate,sandsmark/kate,hlamer/kate,hlamer/kate,jfmcarreira/kate,DickJ/kate,sandsmark/kate,hlamer/kate,hlamer/kate,cmacq2/kate,sandsmark/kate,hlamer/kate,DickJ/kate,hlamer/kate,jfmcarreira/kate,DickJ/kate,DickJ/kate,hlamer/kate,hlamer/kate,sandsmark/kate