Fix Instance Iterator

With the help of @JoshDreamland we fixed the instance iterator and stopped massive
memory leaks from the collision systems and elsewhere.