Clean up some of the datagrid code.

This is a minor cleanup that reduces all the "this" confusion by
assigning real variables to things as quickly as possible, and reduces
all the "var" statements everywhere. It also adds the "$" prefix to
jQuery-wrapped elements.
Add a reload() function for datagrids.

This adds a reload() function that can be called on a datagrid element.
It will trigger a dynamic reload of the grid using the server-side
settings.