Include query parameters in datagrid pagination links.

The datagrid pagination links had some implementation for preserving query
parameters, but it wasn't very complete. The review board code made sure that
the "user" and "group" parameters were part of it, but that lost all the other
things like sort order and show/hide closed.

I've removed the reviewboard implementation for "user" and "group" (in a
separate change) and instead generalized our existing `get_url_params_except()`
method (from `Column`). Because I hadn't realized that this method exists, I've
also included a refactor from my previous similar API change to use the new
generalized util method.

Other consumers of the datagrid who set extra_context['extra_query'] will be
unaffected by this change because it will overwrite the one that this adds.

Testing done:
Added a bunch of review requests, and checked that the pagination links
preserved "sort", "view", and other query parameters.

Fixes bug 1155.

Reviewed at https://reviews.reviewboard.org/r/5354/
Add a hook for registering custom datagrid columns.

DataGrid now has a more formal column registration and defaults setup.
Instead of scanning all columns at instance creation time and populating
some defaults, it now does this once per class. This lets us get rid of
some of our variables and to store less state in memory.

The new DataGridColumnsHook allows extensions to register custom columns
into any DataGrid. This takes care of both registering and unregistering
them.