Fix a crash if git_remote_set_cred_acquire_cb wasn't called before connecting.

Fixes #1700.
Fix a probable leak.