graft: use revset for intersecting with ancestor set
This addresses a TODO added in
a1381eea7c7d (graft: do not use
`.remove` on a smart set (regression), 2014-04-28).
Differential Revision: https://phab.mercurial-scm.org/D7806
#
# Avoid interference from actual test env:
unset HGTEST_JOBS
unset HGTEST_TIMEOUT
unset HGTEST_PORT
unset HGTEST_SHELL