Fixed custom hunspell dictionary directory

Properly loading dictionaries from based on the "indices.analysis.hunspell.dictionary.location" setting if one exists
Remove Java 7 only API

We still run on Java 6 as minimum requirement. Integer.compare(int,int)
was added in Java 7. This caused compile errors on CI.
Fix error getting array fields

Fixes #3000