Test regex search performances

It seems that for some regexes, it is a O(N^2) complexity :/
SearchContext: small code improvement
SearchContext: don't scan_all_region() in smart sync search

The was a performance problem (O(N^2)) for one of the regex search test.
SearchContext: document a known issue (for a rare corner case)