Nif changes and cleanup

Cleaned up and documented part of components/nif.

Work is ongoing, but I wanted to get this out here before I have any more merge conflicts/doing the same work as Scrawl is.

Of note is the new niftest tool and script.  Just point the script at your data file directory and it will validate every nif file.
A bit too much WARNING going on for my taste. It's ok to warn about freeing pointers if the function name suggests creating something, but for a "get" function that is obvious. We have tons of functions that return something by pointer. Adding warnings to all of them would be too much.