Several changes useful to write wrappers in Python

The 3 commits are mostly independent. You may want to cherry-pick only some of them.

The "normalize changed ref names in computation of exclude revspec" was a failed attempt to avoid having to rely on "multimailhook.dontComputeNewRevs". I don't really need it, but it costs almost nothing so I thought it could be useful to someone.

The other two are significant improvements for me.