[SGrid] Make entities and intersections copyable

This patch makes it possible to copy and store SGrid entities and
intersections. Required changes were:

- make entities comparable
- move all intersection data and method implementations to the
  SIntersection class. The iterator now only holds an intersection
  instance.