Introduce FunctionImpl and ExtensionFunctionImpl classes

Old FunctionImpl0,1,2,... will be dropped since they had no purpose
Drop FunctionImplN and ExtensionFunctionImplN

We have FunctionImpl and ExtensionFunctionImpl classes now (2 classes, not 46)