MODE-2285 Corrected the index and index provider beahvior of the ModeShape subsystem for Wildfly

Several issues were fixed and tested.
why are we exporting this dependency ? Are we expecting any other modules outside of `modeshape-jcr` to be using it ?