Replaces a strtol() call

Replaces a strtol() call by the safer chula_atoi()
More system call checks

Adds checks for gmtime_r(), localtime_r(), the gmtoff property of the
tm structure, and the global variable timezone
Adds a few additional tests