merge: fix spurious merges for copies in linear updates
We make better use of contexts to accurately identify copies that
don't need merges.
Add a simple test and update other tests.
#!/bin/sh
echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
hg init a
cd a
hg qnew first.patch
hg qnew first.patch
touch ../first.patch
hg qimport ../first.patch
exit 0