copies-rust: pass closures and iterators instead of `&ChangedFiles`
… to some functions that only use one method.
This will makes it easier to unit-test them.
Differential Revision: https://phab.mercurial-scm.org/D10070
#require docutils gettext $ $TESTDIR/check-gendoc el checking for parse errors