Add CP function library.
Use the target name amplsolver instead of variable SOLVER_LIBS because dependencies are handled automatically by CMake.
Add cp test.
Handle functions with variable number of arguments.