fixes #544 Catch exceptions in the optimizeOplogThread and log them
instead of crashing the thread.