read_packed_refs: use a strbuf for reading lines