Update foam interface to set a function. Use now also case of function pointer, old interface works only with CINT and not Cling
Speed up test random