make QueryRuleSources authority of query rules
jeffzjiang: resolve conflicts with master
merged with master