Another thread safety fix for TFormula

Additional changes needed to safely use different TFormula on different threads while I/O is occurring on another thread.