(into bug978338) Bug 980014 - Allow new tab grid layout to reduce rows/columns if the window can't fit 3x3
Allow up to the maximum rows and columns and have layout flow the tiles without explicit rows.
Update height on init and on render (pref change).
The title extends 4px below the 16px margin because it's 20px tall.
Convert numbers to consts.
Move height/maxWidth setting after updating height.
Update height on load event
Fix code styling.
fix typo
Delay gGrid._render() until document loads to not need a separate height==0 check.