Fix memory leaks

I didn't realise this but often there were retain locks because of the callbacks, resulting in constant memory leaks.

So the changes to the callbacks below are because of this, so that the class doesn't take add to the retain count in a callback. This makes it correctly dealloc when it's owner is destroyed.

The other changes is to invalidate and remove objects which we have ownership of but might also exist outside of it's scope. Now that it's correctly dealloc'd it would have caused runtime crashes because of this.