Merge bzr.dev 4187, and revert the change to fix refcycle issues.
I apparently didn't run the smart fetch tests. Which show that we access inv+chk pages
as a fulltext, and then insert the stream, which expects to get the block as a compressed
block. :(.
Need to rethink how to do it, possibly with weakrefs.
This also brings in CommitBuilder.record_iter_changes() and the updates to btree_index
and backing indices.