Repository: quarkusio/quarkus
Issue: MongoDB BSON types are not in the Jandex index

## Describe the bug

When building Quarkus application that using `mongodb-client` and `mongodb-panache` extentions, ReflectiveHierarchyStep grumbles:

```
[WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
	- org.bson.types.ObjectId (source: <unknown>)
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.
```

## To Reproduce

Create a sample application:

```
mvn io.quarkus:quarkus-maven-plugin:1.13.7.Final:create \\
    -DprojectGroupId=org.acme \\
    -DprojectArtifactId=getting-started \\
    -Dextensions=resteasy,mongodb-client,mongodb-panache
```

Add sample entity:

```java
package org.acme;

import io.quarkus.mongodb.panache.MongoEntity;

@MongoEntity
public class SampleEntity {
}
```

Add sample repository:

```java
package org.acme;

import javax.enterprise.context.ApplicationScoped;
import io.quarkus.mongodb.panache.PanacheMongoRepository;

@ApplicationScoped
public class SampleRepository implements PanacheMongoRepository<SampleEntity> {
}
```
Build project and observe mentioned message:
```
mvn clean package -DskipTests
```

## Environment

```
$ uname -a
Darwin mbp 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

$ mvn --version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /opt/local/share/java/maven3
Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/openjdk11/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "11.4", arch: "x86_64", family: "mac"

```

### Quarkus version or git rev

`1.13.7.Final`, also tried build from main branch:

```
$ git describe --all --tags --always --long
heads/main-0-gfc31727672
```

## Additional info

To resolve issue already tried to add `org.mongodb:bson` to `quarkus.index-dependency`.
The problem here is that all classes within bson library is added to Jandex index, including all CodecProvider's. This causes MongoClientProcessor to register all internal codec providers again, and fail on many of this that does not have default no-arg constructor.

The better solution is to add BuildStep in mongodb-client extention, that should explicitly add only org.bson.types.* classes to Jandex index. I'll try to provide PR with fix for this issue.


Changed files:
extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java

diff --git a/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java b/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java
index 7e1076053a7..8e39a69b417 100644
--- a/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java
+++ b/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java
@@ -45,6 +45,7 @@
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.annotations.Weak;
+import io.quarkus.deployment.builditem.AdditionalIndexedClassesBuildItem;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
 import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
@@ -68,6 +69,23 @@ public class MongoClientProcessor {
     private static final DotName MONGO_CLIENT = DotName.createSimple(MongoClient.class.getName());
     private static final DotName REACTIVE_MONGO_CLIENT = DotName.createSimple(ReactiveMongoClient.class.getName());
 
+    @BuildStep
+    AdditionalIndexedClassesBuildItem includeBsonTypesToIndex() {
+        return new AdditionalIndexedClassesBuildItem(
+                "org.bson.types.BasicBSONList",
+                "org.bson.types.Binary",
+                "org.bson.types.BSONTimestamp",
+                "org.bson.types.Code",
+                "org.bson.types.CodeWithScope",
+                "org.bson.types.CodeWScope",
+                "org.bson.types.Decimal128",
+                "org.bson.types.MaxKey",
+                "org.bson.types.MinKey",
+                "org.bson.types.ObjectId",
+                "org.bson.types.StringRangeSet",
+                "org.bson.types.Symbol");
+    }
+
     @BuildStep
     CodecProviderBuildItem collectCodecProviders(CombinedIndexBuildItem indexBuildItem) {
         Collection<ClassInfo> codecProviderClasses = indexBuildItem.getIndex()