refs: handle NULL pointers passed to git_reference_iterator_free() Signed-off-by: Brodie Rao <brodie@sf.io>