[layouts] Validate number of columns and rows in TWGridLayoutManager