CourseInstanceSummaryResource now uses user_profile.id. Fixes problems in production when user.id != user_profile.id
Merge pull request #93 from LassiHaaranen/master

Change CourseInstanceSummaryResource to user user_profile instead of user
- Added a bunch of methods to BaseExercise that are related to the max_submissions and MaxSubmissionsRuleDeviation.
- Rewrote the parts of the BaseExercise.is_submission_allowed that considered the submissions_left check.
- Also some PEP8 refactoring near the changed and new code.
- Removed some unnecessary imports from submission_models.
- Added MaxSubmissionsRuleDeviationAdmin.
Merge branch 'master' into submission_exceptions