Fixes to schema migrations - WIP
Fixes ProgramAccountingController.setup_accounts()

Fixes typo in the setup method
ProgramAccountingController.setup_accounts() which was causing migration
accounting:0005_import_data to fail.

setup_accounts() is called in one previous migration,
accounting:0002_accounting_data. On these first invocations, the Account
model has no instances, so every call to Account.objects.get_or_create()
is able to successfully create new objects for all the Programs.
However, with the typo, the Program foreign key was not set, and was
saved to be None.

In accounting:0005_import_data, setup_accounts() is called again for
each Program. Using double-underscore notation to filter by program__id
is allowed for the get() part of get_or_create(). Since program.id is an
integer but program was None for all objects in the database, the get()
always failed and called create(). Then the create() would fail since
the name field is required to be unique.

This fix creates Account objects with the correct Program foreign key,
so that the first call to setup_accounts() will create an Account with
the correct Program foreign key, and subsequent calls will successfully
get the already-created object.
Deletes stale content types during migrations

Adds a modified version of
django.contrib.contenttypes.management.update_contenttypes(),
which always deletes stale content types without user input.
Uses this file in various migrations to delete the content types for
recently removed models.

In one case, trying to delete stale content types too early resulted in
an error, because of a recently added foreign key to ContentType whose
migration had not yet run. Fixes this by allowing
update_esp_contenttype() to use a frozen ORM, and passing that in from
the migration when necessary.
Merge pull request #849 from learning-unlimited/migration-fixes-jmoldow

Migration fixes