This implements a way to use the `functions` command to perform introspection to learn about the characteristics of a function. Such as where it came from. Fixes #3295