Add rebase and unit test

Given a patch history H (sequence of patches, ie Array of patches) and a parallel patch P rooted at the same document context, rebase P onto H.

This adds jiff/lib/rebase as an experimental API, and refactors jiff/lib/commute to be more flexible.