Avatars: cache whether the feature is enabled

Calling isOptionEnabled() every time the feature needs to inject avatars
next to a thread is very expensive, so this CL adds logic for caching
this value and updating it when necessary. It could be further
optimized, but I think we have achieved a sweet spot between
optimization and complexity (which could cause bugs).

Fixed: twpowertools:88
Change-Id: Ia7abba2579a00e14125d9912ea21fa953b3fcd53
diff --git a/package.json b/package.json
index 3263d41..5765554 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
   "private": true,
   "dependencies": {
     "@material/tooltip": "^12.0.0",
+    "async-mutex": "^0.3.2",
     "google-protobuf": "^3.18.0-rc.2",
     "grpc-web": "^1.2.1",
     "idb": "^6.1.2",