Add missing `git_reference_symbolic_create_with_log`.

It's exported in the headers, but the implementation was missing.
Allow the log message to be NULL.
Merge pull request #2023 from arthurschreiber/patch-1

Add missing `git_reference_symbolic_create_with_log`.
Solaris does not have qsort_r
Merge pull request #2034 from jacquesg/solaris-qsort

Solaris doesn't have qsort_r either
Handle git_buf's from users more liberally
Merge pull request #2036 from ethomson/git_buf_sanitize

Handle git_buf's from users more liberally