Fix value for AXSelectedText

We were grabbing a const reference to a reference into a temporary object (result of editor_t::ranges), so the range used was effectively a pointer to a destroyed object.
Change ASSERT_NE → ASSERT

Since we do not have a to_s function defined for the iterator type, we cannot use “semantic assertions”.