Overhauled name lookup, no more cache file.

Significant changes to lookup.py. Removed all file-written caches, since they're unneeded.
Reverted from class to a pair of functions which fill the role fine.
Changes to arguments since they are a bit different now.
Updated other files to reflect how lookup works now.

Removed lock entirely since removing caches also removes the possible race condition.