Add Function syntax classification type

fix an issue with coloring namespaces
refactor DocumentEventsListener
add events throttling into SyntaxConstructClassifier