implmented new lock on rzip.c

ticket lock implemented to correct issue of lock acrquired in one thread and released in another