Incremental test framework added.

This allows cloning a buffer, changing it, and then see whether it is
correct. The last insertion is also stored, so we can test whether the
changes are incrementally applied.