Update internal factory using definition to be a function ptr instead of std::function.
Update internal factory using definition to be a function ptr instead of std::function.

PiperOrigin-RevId: 441603329

google/cel-cpp,google/cel-cpp