Add confirmation dialog to checkoutHead

There have been a few reports of files mysteriously going back to the last version in the tree. My theory is that it is because of people fat-fingering the Undo command because the default keyboard mapping is too similar. This will at least prevent most accidental data loss.

Fixes atom/atom#3168