s3-locking: convert brlock to TYPESAFE_QSORT()