Named reentrant locks with deadlock detection for Ruby