Protect global list of functions from concurrent access

The list returned from TROOT::GetListOfFunctions needs to be protected
from concurrent access to allow use of TFormulas on different
threads.