Added class Polygon. Its constructor checks, if it has self-intersections and throws exception in this case.

Added tests for Polygon's constructor.