Collision search updated.

Optimized broad phase of collision search.
Also fixed some memory leaks with virtual destructors.