Typeahead: Allow function names passed as options

Currently typeahead takes its options as-is. This is problematic for the data api since functions cannot be passed this way. Allow function names to be passed as functions, and look for them. If found, use that instead.