loci: add a convenience wrapper around of_object_id_str

Reviewer: trivial