Fix possible free'ing of unitialized pointer in error case
Implement analog for 'git checkout --branch xxx ...'
Add missing git_buf_free
Test: Cleanup some cleaning code
Tests: Add test for check out of given branch during clone
Default git_clone_options' checkout strategy to GIT_CHECKOUT_SAFE_CREATE
Merge pull request #1222 from scunz/clone_branch

Switch to specified branch during clone