Check the type of the IndexInput rather than the Directory to detect native implementation. This is a simpler and more correct test. It also permits the Directory to return a mixture of native and non-native IndexInput implementations.