add distance methods to Ray and Line; simplify segment calc

The concept of similar triangles can be used to obtain a
delightfully simple expression for the distance from a
point (x1,y1) to the line y=mx + b. Here is the master
result which relies on factoring at the end:

>>> from sympy import *
>>> var('x1 y1 m b x y')
(x1, y1, m, b, x, y)
>>> p=Point(x1,y1)
>>> l=Line((0,b),slope=m)
>>> factor(l.perpendicular_segment(p).length,deep=True)
sqrt((b + m*x1 - y1)**2/(m**2 + 1))

So with
y2 = m*x1 + b (pt on line vertically above or below x1)
H = y1 - y2
d2 = 1 + m**2

dist = abs(H)/sqrt(d2) = sqrt(H**2/d2)

which is the factored form shown above and is now returned
without the need for simplification in this commit.
Merge pull request #2783 from smichr/geom

geometry