fdo#72413: Fix O(n^2) in inserting SearchResults' items.

Thanks to moggi, who pointed to this, should be documented somewhere.

Change-Id: I96ba2cca930e4b784a825987ea19e4fc9aacb6d6
(cherry picked from commit dc22a2aa1b2858394ad70806f34d1327936af7a0)
SearchResults dialog: Use also AlignToCursor when setting cursor.

Change-Id: I4c802b5164bc0f0dc11da80c2225f9fc274e227c
(cherry picked from commit d45bc3429c859392aa9fd7932908e50b0716a39c)