EA-54213 check for range marker validity on editor fragment hint painting

(cherry picked from commit e76a086ef427a547702934dc27ab0ef69fc0ead6)
EA-49118, EA-56080 - offset sanitization in editor replace popup callbacks

(cherry picked from commit 063ff02777ae5a537b21b4dab1ca53c0df01d632)
EA-57599 - skip invalid fold regions on capturing of folding state

(cherry picked from commit c81aad3bdb07ffa59bf160c9bf4712ea61c398a2)