If scope selector contains $ only consider document scopes

Scope selectors like "source.c$" should match scopes like "source.c attr.something.1 attr.something.2 dyn.selection". This patch changes the scope matching to behave this way.

This is done by separating document scopes from non document scopes.
the method _append_ in _scope_t_ has been changed to take a bool indicating if the scope is a document scope. Strings passed to the various scope constructors still create scopes that are document scopes. e.g.

     scope::scope_t("source scope");