DEB-11363 grid optimizations

@sergiopereiraTT Could you please review?
@slikrik98 I think you'll be interested in this change as well.

I profiled the performance of adding and removing rows and found the biggest bottlenecks to be DOM reads (`scrollTop` inside `updateRowCount`) and writes (`width` inside `updateCanvasWidth`).  This change refactors out the read of `scrollTop` and the write to `width` where possible.

Inside `updateRowCount`, there is a debounced invokation of `render` using the `h_render` variable.  So after this change `updateRowCount` shouldn't be the source many problems for us.

I do see other places in our code where `render` is being called (directly or indirectly) too frequently.  `render` is expensive as it rebuilds the grid, as @slikrik98 has pointed out.  This change doesn't tackle that part of the problem.

I'm surprised removing this line doesn't cause any bugs. I'm not familiar with the code but it looks related to resizing the grig. Have you tested resizing a widget and see if the grid maintains its scroll position?