patch: git metadata was ignored if strip > 1
gitpatch objects emitted by iterhunks() are modified in place by applydiff().
Processing them earlier improves iterhunks() isolation. applydiff() modifying
them should still be fixed though.
Testing that hghave does not crash when checking features $ "$TESTDIR/hghave" --test-features 2>/dev/null