Fix massive slowdown when firing weapons/calling u_see

Well, thanks to profiling tools, I found out that u_see was calling has_artifact_with, which was using O(n^2) operations on the new list-based inventory. Move relevant code into the inventory class.