Fix SD-1914 - InvalidOperationException "Trying to build visual line from collapsed line"

This exception was caused by FoldingManager.UpdateFolding() re-using FoldingSections and adjusting their end offset.
If those FoldingSections were folded, the corresponding CollapsedLineSection was not updated for the new end position.
This inconsistency would cause visual glitches (such as fold markers not updating properly), and in some cases the InvalidOperationException during rendering.

FoldingSection now handles when its StartOffset or EndOffset is changed, and updates the CollapsedLineSection accordingly.