FlushNotAllowedEngineException during optimize
default to wait if a flush is on going when executed as part of optimize request
closes #3631