Calculate correct midpoint for first contour point.

If the first point is off-curve, it connects to an implicit point
somewhere between the first and last point. This point was not
calculated before, resulting in strange curves at the start of the
contour.

This fix calculates the last point of the contour. It can handle all
cases for on- and off-curve points for the first and last points.

This fixes #18.