Windows: improve performance via buffered I/O
The posixfile_nt code hits the win32 file API directly, which
essentially amounts to performing a system call for every read and
write. This is slow.
We add a C extension that lets us use a Python file object instead,
but preserve our desired POSIX-like semantics (the ability to rename
or delete a file that is being accessed).
If the C extension is not available (e.g. in a VPS environment
without a compiler), we fall back to the posixfile_nt code.
hg init test
cd test
echo foo > a
hg ci -Ama
hg up -r0000
echo bar > a
echo % should issue warning
hg ci -Amb
hg up -r0000
echo stuffy > a
echo % should not issue warning
hg ci -q -Amc
hg up -r0000
echo crap > a
hg branch testing
echo % should not issue warning
hg ci -q -Amd