Improve area accuracy for small polygons.

The use of cosines can introduce large rounding errors for small distances.

Fixes #28.