MFC r315095, r315096, r315097, r315187:
libc: small cleanups.
Rename nitems to numitems: it shares the anme with an existing macro in
sys/params.h. Also initialize the value later which avoids asigning the
value if we exit early.
Unsign setlen: it is local and will never be negative. Having one more bit
for growth is beneficial and it avoids a cast when it's going to be used
for allocation.
Remove unused initialization: "num" is properly defined before use.
Let calloc(3) do the multiplication.