Allow primitive update to remove primitives

This is a pull request into the `quadtreePrimitive` branch.

Fix a crash that occurs when a primitive's update function removes other primitives.  It's still possible for adding/removing primitives to cause a given primitive to be updated twice or not at all in a particular frame, but I think working around that will be expensive and I haven't seen a case where it is a problem worth worrying about.