Fix index hardcoding and potential name collisions with reserved words
- Rename nitems variable to num_items to avoid overshadowing nitems(..) macro
- Use nitems(..) instead of hardcoding indexes
- Change i/index from int to unsigned int type for consistency with other variables and to fix -Wsign-compare warnings
- Rename string to string_arr to make it clear that it's char**, not char*, and to also avoid potential issues with reserved keywords in languages (C/C++) or interfaces that might crop up in the future
- Fix uninitialized variable access that was causing a large degree of grief on stable/10 when I was running the tests as noted in https://reviews.freebsd.org/D4767 .
MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division