(into bug978338) Bug 980014 - Allow new tab grid layout to reduce rows/columns if the window can't fit 3x3

https://bugzilla.mozilla.org/show_bug.cgi?id=980014