more correct EntetyItem liste maintenance

I noticed today that in a previous commit I had accidentally created a minor bug in how the "Moving" and "Mortal" entity lists are maintained in the EntityTree class.  In particular I allowed the lists to be modified while they were being iterated, thereby causing the iterator to sometimes skip an element of the list.  This doesn't cause a crash, and would rarely produce a noticeable problem, but it still needs to be fixed.
While verifying that the bug did not crash anything I noticed that the gun.js script can be used to drag interface framerate down to single digits.  Since the bullets didn't have a lifetime, if you were to shoot many bullets toward the far corner of the domain then much time would be spent moving the bullets around the EntityTree.  Adding a finite lifetime helps reduce accidental griefing by gun.js.