Switch to class-based views.

Remove function `index` and add class `Index`. The new class fills the same role
as the old function.

Function `reverse` can resolve paths to functions, but it cannot resolve paths
to classes. As a result, module `urls` and several calls to `reverse` must be
updated to compensate for this change.