Moved imports to startup.py.

Conflicts:
	cms/startup.py
	lms/startup.py
Fixed problems with psychometrics

- Update key comparisons for Opaque Keys
- Search for 'problem_check' instead of 'save_problem_check' when
  filtering TrackingLogs.
Rewrote inline discussions hotfix from 58553a7f

In general, this is a very straight forward fix - I decided not to
cherry-pick directly from 58553a7fb8fbc33dfd40c8e7ca39b0f896fb5b32
as the diff exposes very radical differences.
Check REQUEST_CONTEXT.context exists before accessing it.

LMS-11226
Added handling in gitlog for missing import logs

Fixes a template error that occurs when viewing a course's detailed
git import log. The problem happens for courses imported using methods
other than the `git_add_course` command.