First batch of changes for porting the entire ChFunction* machinery to the ChSharedPtr<ChFunction>approach.
I started with upgrading all the classes that are inside the motion_functionsdirectory, of course, and I also updated the demo_chfunctions.
Note that I managed to keep backward compatibility. And, from the user point of view, the API would have minimal changes anyway.
An open issue is the following: if I copy an object that points to a ChSharedPtr<ChFunction>, should it do a shallow or deep copy (i.e. sharing the function, given that we have the ChSharedPtr weaponry, or duplicating the function as well?)  As functions are light objects, it should be a deep copy, but maybe one could leave it to the user, with a flag. Suggestions?