EA-39459 - allow safe access to folding model's cached data from non-EDT threads (used by EditFoldingOptionsAction)
stricter validation in folding model on adding fold regions
speed up restoring of folding state in editor (DocumentFoldingInfo#setToEditor)
currently it's slow for a file with large number of fold regions, that was previously closed with a lot of regions not in their default state - e.g. large XML file after collapsing all regions
* use binary search instead of linear search
* move search to FoldingModelImpl to avoid excessive garbage creation (for copying an array of fold regions)
cleanup
fighting memory leak