[client] Handle a merge error.
[client] Fix a few bugs.

* Remove unmerged index entries on commit.
* Ignore update_worktree() errors in clone and merge.