Merge bzr.dev, resolve conflicts.
Check failing tests:
- bug #225020 is back under a different ugly head. But I don't think it's
  worth working around it *again* given that: it's a bug in curl and
  fixed there (in 7.19, still need checking for 7.18.2 available in
  intrepid), occurs only in the test suite and only with
  python-2.7.0alpha0, I need a true python-2.6 (wip).
- more problematic are the thread leaks, it seems that python-2.6 refuse
  to spawn more than 256 and the whole test suite hits that
  limit. Re-running failing tests with --starting-with succeeds.
- some test_read_bundle tests fail with a curl connection error (server
  certificate verification failed) but they use the wrong CAfile (need
  investigaton, most probably a wrong setUp, we need to use a CAfile that
  knows about the test server).