Make SignalHook disconnect properly from the signal when a sender was specified in the constructor

The Signal.disconnect() method in Django uses a combination of the dispatch_uid
and the sender as the lookup key for finding the signal receiver to remove.
This means that if SignalHook used a sender in the connect() call, it must
provide that same sender when calling disconnect() later.

This issue was causing ReviewBoard extensions that should have been unloaded to
be kept alive and continue receiving signals, which in turn led to extension
actions happening multiple times.

Testing Done:
Added new unit test.

Reviewed at https://reviews.reviewboard.org/r/6410/
Merge branch 'release-0.8.x'
Reduce query counts when querying API resources.

We previously introduced a prefetch_related() optimization for list
resources, helping to get the query counts down for any referenced
ManyToManyFields.

We also had a select_related() call, but this wasn't good enough.
Calling select_related() without parameters will only operate on
ForeignKeys that don't allow for NULL values.

Now, we build a list of fields to explicitly pass to select_related().
This has the benefit of working with fields that allow NULL values, and
prevents looking up fields we're not going to return in the payload.

Reviewed at https://reviews.reviewboard.org/r/6411/
Merge branch 'release-0.8.x'