Fix bad cursor positioning when entering an inset
The test added at
359aef92 was incorrect. Actually, Inset::editXY
returns the inset when it is edited and also when it is not, which
can be confusing. So if we are unlucky and the slices positions in the
text area and in the inner inset match, the code below triggers and
many bad things can happen.
Also improve the documentation of Inset::editXY and TextMetrics::editXY.
Fixes #10691.
(cherry picked from commit
c9fefd5a2cf5eb97fb23279e5b5e2f4c3a19b22e)