libc: tests: fix luacheck warnings in the fortification test generator
All of these are simple shadowing that don't need to happen; we're
passing the shadowed value through in every case anyways, just use it
in the closure in a more lua-natural fashion.
While we're here, lint the generator every time we generate tests to
ensure that we don't regress without having to remember to manually
run luacheck.
Reported by: jlduran
Reviewed by: jlduran, markj
Differential Revision: https://reviews.freebsd.org/D49235