Fix compile issues on windows

- There were sqrDist(Point const*, Point const*) and sqrDist(Point const&, Point const&). First commit removes the pointer version.
- Second commit fixes issues with to general comparison operator. This commit restricts the comparison operator to TemplatePoint(s).