Refactored linear.pyx to use pure c function exposed through python wrappers.

Also removed dependeancy on nearest point from RectangularRegion. It still needs to be removed from its code, but this will be refactored into thew interpolate class soon anyways