refs.c: don't expose the internal struct ref_lock in the header file