Handle closing changesets and closed branches
This detects closing changesets and decides what to do with them according to the two new boolean flags. By playing with these flags, we can make it acceptable for the mostly backwards-compatbile 0.6.1, and start pruning closed branches more widely for 0.7.0