[client] Improve GC performance.

Separate commit pointers for uploaded commit and checked out commit.
It's not correct in some cases to use one pointer for both, such as
when merge fails.
Merge branch '1.6'