IntegrationTestCase needs to make more sense

The new `IntegrationTestCase` is somewhat complicated, and provides some substantial abstractions.  It also doesn't handle function-based views well in the slightest.  I've reflowed it a bit to make more sense, made it deal with requests more smoothly, and added understanding of function-based views.  And lots and lots of comments.

@meshy @Ian-Foote review please? :)
```python
class Foo:
    def __call__(self, bar):
        return bar

foo = Foo()
# This instance foo of the class Foo is callable, but is not a function:
foo(1) == 1
type(foo) == Foo

import types
isinstance(foo, types.FunctionType) == False
```