nurikabe: extracted function connectedComponents
nurikabe: checking wall sizes, too