Text buffer change event handler. Performs analysis of the change. If change is trivial, such as change in whitespace (excluding line breaks that in R may be sensistive), simply applies the changes by shifting tree elements. If some elements get deleted or otherwise damaged, removes them from the tree right away. Non-trivial changes are queued for background parsing which starts on next on idle. Methond must be called on a main thread only, typically from an event handler that receives text buffer change events.