Free all used references in the source tree
Since references are not owned by the repository anymore we have to free
them manually now.
Signed-off-by: schu <schu-github@schulog.org>
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.