Adding Django 1.7 compatiblity

This fixes `run_huey` command for Django 1.7.

Django 1.7 can export not only modules, but AppConfig objects. All old-style apps automatically get their own AppConfig object. The old code cannot handle situation when `INSTALLED_APPS` exports AppConfig class instance instead of a module.