More scripting work

* fixes some spelling mistakes - closes #1787
* makes sure to flush the edit packet queue on script shutdown
* fixes scripting deadlock - closes #1813
* fixes Octree::tryLock*() to return bool
* uses tryLock*() in a couple places that can afford to not run if the lock is busy
* fixes particles update() to really only honor getLifetime() and not the old die if old and still logic
* handles case of getParticleProperties() on particle that is dead/killed - closes #1750
* improves behavior of ParticlesScriptingInterface::deleteParticle()