separate ten.cmake (for clients of libten) from prog.cmake (for libten test programs)

The choice of optimization, warnings, etc. can now be entirely controlled by the libten client.