LUCENE-768: make sure IndexReader.close releases write lock even after hitting an exception in one of the methods that acquire the write lock