Add RewriteHistoryOptions.OnSucceeding and OnError

OnSucceeding is a chance to inspect rewritten commits/refs:
if it doesn't look right, throw to trigger a rollback.

OnError is a chance to inspect rewritten commits/refs before
rollback occurs, to see what went well and what didn't.
Publicize TreeEntryDefinition.From() overloads

Having access to these can make a CommitTreeRewriter much simpler.