Improvements in the Context class

The TransformPoints and Distances methods are now
implemented in Context, so it is not necessary to provide
an implementation in the backend.

Improved the Distance struct.