Pup 2845 move epp functions

This moves the epp functions to the new function API. While doing this work, a couple of issues
in the type calculator were discovered and corrected.

This also adds the ability to inject the scope into a function when dispatching (for InternalFunction only).

Note that the old functions are kept for documentation generation purposes, but they now always fail
when called.