raycasts against Shapes

I needed raycasts against Shapes for other stuff so I decided to get them done as a separate PR.
btw, why isn't this code in the Shape subclass implementations?