pw_sync/borrow: Do not use std::unique_lock

It turns out std::unique_lock can throw exceptions so even with
-fno-exceptions this may pull in a hefty code size cost of more
than 1KiB. Instead Borrowable is refactored to go with an optimized
implementation which has a lower memory and code size impact,
however it does confuse the lock annotations checks from clang.

Change-Id: I749a1b0a370401c8c2088bc800fa7f9aeee3e71c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66220
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_sync/BUILD.gn b/pw_sync/BUILD.gn
index 16554c1..81b7003 100644
--- a/pw_sync/BUILD.gn
+++ b/pw_sync/BUILD.gn
@@ -63,6 +63,7 @@
   public_configs = [ ":public_include_path" ]
   public = [ "public/pw_sync/borrow.h" ]
   public_deps = [
+    ":lock_annotations",
     ":virtual_basic_lockable",
     dir_pw_assert,
   ]