A lot of changes in viewshed.c

Mostly with finding the correct intersection with a border edge of the
grid and the line between the solar coordinates and the current cell in
the grid. Also did some work on modifying the pointVisibleFromSun
method, not complete yet. Not tested yet.