ContextualStorage: Autodetect passivation-capable beans.

Removes the passivationCapable field from ContextualStorage, instead
autodetecting passivation capability for each bean by testing it for
the PassivationCapable trait.  This makes ContextualStorage work in
CDI implementations that do not support passivation at all such as
Quarkus, where there was previously an assumption that @FlowScoped
beans are always passivation-capable.
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/FacesScopeBeanHolder.java b/impl/src/main/java/org/apache/myfaces/cdi/FacesScopeBeanHolder.java
index bf3f624..f450533 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/FacesScopeBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/FacesScopeBeanHolder.java
@@ -53,7 +53,7 @@
     public ContextualStorage getContextualStorage(BeanManager beanManager, FacesContext facesContext)
     {
         return (ContextualStorage) facesContext.getAttributes().computeIfAbsent(FACES_SCOPE_MAP,
-                k -> new ContextualStorage(beanManager, false, false));
+                k -> new ContextualStorage(beanManager, false));
     }
     
     public ContextualStorage getContextualStorageNoCreate(BeanManager beanManager, FacesContext facesContext)
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/util/ContextualStorage.java b/impl/src/main/java/org/apache/myfaces/cdi/util/ContextualStorage.java
index 7f9503f..a8190d2 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/util/ContextualStorage.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/util/ContextualStorage.java
@@ -48,18 +48,14 @@
 
     private final boolean concurrent;
 
-    private final boolean passivationCapable;
-
     /**
      * @param beanManager is needed for serialisation
      * @param concurrent whether the ContextualStorage might get accessed concurrently by different threads
-     * @param passivationCapable whether the storage is for passivation capable Scopes
      */
-    public ContextualStorage(BeanManager beanManager, boolean concurrent, boolean passivationCapable)
+    public ContextualStorage(BeanManager beanManager, boolean concurrent)
     {
         this.beanManager = beanManager;
         this.concurrent = concurrent;
-        this.passivationCapable = passivationCapable;
         if (concurrent)
         {
             contextualInstances = new ConcurrentHashMap<>();
@@ -146,7 +142,7 @@
      */
     public <T> Object getBeanKey(Contextual<T> bean)
     {
-        if (passivationCapable)
+        if (bean instanceof PassivationCapable)
         {
             // if the
             return ((PassivationCapable) bean).getId();
@@ -161,8 +157,9 @@
      */
     public Contextual<?> getBean(Object beanKey)
     {
-        if (passivationCapable)
+        if (beanKey instanceof String)
         {
+            // If the beanKey is a String, it was generated by PassivationCapable#getId().
             return beanManager.getPassivationCapableBean((String) beanKey);
         }
 
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewTransientScopeBeanHolder.java b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewTransientScopeBeanHolder.java
index 39aa580..2506722 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewTransientScopeBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewTransientScopeBeanHolder.java
@@ -48,7 +48,7 @@
                 facesContext.getViewRoot().getTransientStateHelper().getTransient(VIEW_TRANSIENT_SCOPE_MAP);
         if (contextualStorage == null)
         {
-            contextualStorage = new ContextualStorage(beanManager, false, false);
+            contextualStorage = new ContextualStorage(beanManager, false);
             facesContext.getViewRoot().getTransientStateHelper()
                     .putTransient(VIEW_TRANSIENT_SCOPE_MAP, contextualStorage);
         }
diff --git a/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopeBeanHolder.java b/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopeBeanHolder.java
index 61227e1..22e9fbb 100644
--- a/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopeBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopeBeanHolder.java
@@ -36,7 +36,6 @@
 import javax.faces.context.FacesContext;
 import javax.faces.flow.Flow;
 import javax.faces.flow.FlowHandler;
-import javax.faces.flow.FlowScoped;
 import javax.faces.lifecycle.ClientWindow;
 import javax.inject.Inject;
 import javax.servlet.ServletContext;
@@ -105,9 +104,7 @@
      */
     public ContextualStorage getContextualStorage(BeanManager beanManager, String flowClientWindowId)
     {
-        return storageMap.computeIfAbsent(
-                flowClientWindowId,
-                k -> new ContextualStorage(beanManager, true, beanManager.isPassivatingScope(FlowScoped.class)));
+        return storageMap.computeIfAbsent(flowClientWindowId, k -> new ContextualStorage(beanManager, true));
     }
     
     public ContextualStorage getContextualStorageNoCreate(BeanManager beanManager, String flowClientWindowId)