Re #8634. Add caching of names in FunctionFactory::getFunctionNames.

This method was fairly expensive because it had to create an instance of
every registered function every time to find out if it's the requested
type. This method is called to create validators in various algorithm
init methods, which can be called a lot it - for example - the algorithm
is used as a sub-algorithm in a loop within another algorithm.

It's now cached in a map that's a member of FunctionFactoryImpl. The caching
had to be made thread-safe with a mutex. On the plus side this allows the
resulting vector to be returned by reference-to-const.
Re #8634. Add some kind of testing for getFunctionNames.
Re #8634. Take advantage of reference return type.
Re #8634. Clear cache if functions are added or removed after startup.

Can be done from python, and of course it invalidates the cache.
Re #8634. Make sure the FrameworkManager is started in tests.

...before the first time getFunctionNames is called. Otherwise the cache
will be populated before the functions have been registered.
Merge branch 'feature/8634_functionfactory_getfunctionnames_caching' into develop