Convert niffile.cpp to use std::map instead of a custom search function.

I haven't profiled this, but it should speed things up a decent bit.