cr: cancel existing CRs synchronously with Resolve() call
cr: cancel existing CRs synchronously with Resolve() call

When folderBranchOps writes a new unmerged update, it calls
cr.Resolve() while holding mdWriterLock, to let CR know that new data
has been committed to the branch.  This should cause any current CR to
be canceled.  However, that happened via a channel, and so the current
CR could complete, and clear the unmerged branch completely including
the new commit, before it learns about the new input.

To fix the race, this change makes sure that cr.Resolve() cancels any
existing CR before it returns to the caller.  This solves the race
because the existing CR will need to take mdWriterLock before
completing its resolution, and after it takes mdWriterLock it checks
whether it's been canceled or not.

Issue: KBFS-1746

keybase/kbfs,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/kbfs,keybase/client,keybase/kbfs,keybase/client,keybase/client,keybase/client,keybase/client,keybase/kbfs,keybase/client