Add a simple motion clamping based continuous collision detection.

It works using swept spheres. This is not good for concave objects, but definitely good enough for
projectiles (bullets, arrowheads, etc.).

This also fixes a minor bug on the constraint solver.