refs.c: add new functions reflog_exists and delete_reflog