[Extensions] Convert the parameters of the function handlers into a struct

The previous syntax was too verbose and now with the struct, adding
a new parameter won't cause a mass rename.
[Extensions] Remove the InternalExtension class

All the functionality was moved tho the ExtensionFunctionHandler and
can be optionally used via composition.