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.
Fix UpdateLibgit2ToSha.ps1 path context handling