transactions: avoid late tear-down (issue641)
We use weak references (ugh) to avoid having to manually delete
transaction references out of each call frame when an exception occurs.
#!/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