for_each_recent_reflog_ent(): use strbuf, fix offset handling