typeahead: Add method to use objects named by a string

The function has the following behavior depending on the argument:
 - If the argument is a function, return that
 - If the argument is the name of a function, return that function
 - If the argument is the name of a non-function object, return a
   function that returns that object
 - Otherwise, return a function that returns the argument
Add tests to allow passing a function name in the source options
Allow passing function names in source option
Add tests to allow names in all typeahead function options
Extend typeahead to allow function names in all function options