Fix data race in StrictConnPool

This is an alternative to the implementation proposed in #293 as
described by
https://github.com/apache/httpcomponents-core/pull/293#discussion_r654678265
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/pool/StrictConnPool.java b/httpcore5/src/main/java/org/apache/hc/core5/pool/StrictConnPool.java
index ac505d8..c9cd8b4 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/pool/StrictConnPool.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/pool/StrictConnPool.java
@@ -657,6 +657,8 @@
         private final Object state;
         private final Deadline deadline;
         private final BasicFuture<PoolEntry<T, C>> future;
+        // 'completed' is used internally to guard setting
+        // 'result' and 'ex', but mustn't be used by 'isDone()'.
         private final AtomicBoolean completed;
         private volatile PoolEntry<T, C> result;
         private volatile Exception ex;
@@ -695,7 +697,10 @@
         }
 
         public boolean isDone() {
-            return this.completed.get();
+            // This method must not use 'completed.get()' which would result in a race
+            // where a caller may observe completed=true while neither result nor ex
+            // have been set yet.
+            return ex != null || result != null;
         }
 
         public void failed(final Exception ex) {