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.