util._matcher: unify pattern normalization
This should fix
issue347.
It also highlights one issue with the directory walking code when
you have an --include pattern that matches the end of a filename.
This is fixed by the next patch.
#!/bin/sh
mkdir t
cd t
hg init
echo a > a
hg add a
hg commit -m "test" -d "1000000 0"
hg verify
hg parents
hg status
hg rollback
hg verify
hg parents
hg status