ATS2/libats-ATS1 library

FYI.

I ported some ATS1/libats code to ATS2:

Some testing code for the ported library functions is in the following
directory:

Please see files of the names libats_ATS1_*.dats.