In findAnyFunction, properly handle the template case.

As the other findFunction*, findAnyFunction does not
(yet?) instantiate the function template if has not
yet been instantiated.

Also add test for findAnyFunction.
Add instantiation (if needed) to findAnyFunction
In findFunction*, add template instantiation if needed.

Update the test accordingly.
Merge branch instantation on function lookup.