localrepo: move the addchangegroupfiles method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.
The method had a single caller, far too few for being kept in local repo.
Testing that hghave does not crash when checking features $ "$TESTDIR/hghave" --test-features 2>/dev/null