[test][is_valid] add one more test case: add a polygon with many holes
(important note here: many means more than the number of turns)
[algorithms][is_valid] fix bug in initialization of DFS data for
detecting cycles