[selectors] Dfn 'evaluate a selector', make it take scoping into account, refine the 'Match a Selector' API hook.