LUCENE-1397: fix thread hazard whereby optimize can throw 'BG merge hit exception' IOException without setting the root cause