Clean up some attribute signature logic.

We had a conditional that was a bit messy and complicated, with two
paths providing the same exact result. This simplifies the code paths.
Fix issues with debugging sql_delete ops in the unit tests.

The sql_delete code in the unit tests was broken in the debug=True case,
and had an unnecessary debug=debug attribute set in the debug=False
case. This fixes these cases and also pulls out the call to sql_delete,
since it doesn't change between those calls.
Fix some pyflakes warnings.

This fixes a comparison and removes some unused variables.
Add a RenameModel mutation for handling model renames.

The new RenameModel mutation allows an evolution to indicate that a
model has been renamed. This handles updating the signature for any
related ForeignKeys or ManyToManyFields and generating any SQL to
perform the table rename (if needed).

For the unit tests, some work was needed to allow models to be added
before the base test model, in order for model creation/destruction to
happen in the right orders.

Reviewed at https://reviews.reviewboard.org/r/6216/