Moved to pthread_read_write lock
- Adding check to be sure objects are correct in testOneThousandAndOneWrites
Fixed unmatched lock