Fixed a null pointer error in LuceneIndex close.
Used IOUtil to close closable resources.