Switch algorithm for scope matching.

Switch algorithm for scope matching. Detailed in: [Frameworks/scope/doc/design.md](https://github.com/joachimm/textmate/blob/e591634496f6b218388c5a97af6de1531dab6b15/Frameworks/scope/doc/design.md)