fix set/getsampwent iterator in tdbsam to use an allocated list