clear all octree related state when disconnecting from a domain
fix random crash on checkEnterLeaveEntities
fix crash in mouse messages while quitting
Merge pull request #3751 from ZappoMan/entityBugs

various entity bug fixes