refs: convert dwim_ref and expand_ref to struct object_id