Fixes the several entity crashes

* crash on changing domains while animated, moving, or mortal entities are active
* crash in client in EntityTreeRenderer::renderElement() - this was related to the client getting a delete entity notification while in the midst of rendering. Since these things can happen on different threads a lock was needed
* fix to possible crash caused by pruning during processing moving entities