Implement base class for storing OpaqueKeys.

The keys are meant to have a variety of types (which are known to the
consuming application), and a varieties of implementations of each type
(which are transparent to the consuming application).

Particular key types can specify their own required methods, but
the only global requirement of an opaque key is that be serializable
to unicode.
Add base classes for opaque keys to be used by LMS, Studio, and the modulestores
Implementation of old-style keys as OpaqueKeys (Location and course_id)
Change Locators into UsageKeys and CourseKeys
Fix all uses of UsageKeys and CourseKeys, and all of their tests.
test_access squash me
fixup! Fix all uses of UsageKeys and CourseKeys, and all of their tests.
Create json encoder class to handle OpaqueKeys
with special handling of Locations and SlashSpecifiedCourseKeys
Fix SlashSeparatedCourseKey not found errors
@cale plz review, get_course(_by_id) doesn't raise 404 for malformed course id

Conflicts:
	lms/djangoapps/courseware/tests/test_courses.py
Cleaned up auto auth.

Still some issues with roles.
Opaque debugging squashable
change get_course_by_id to raise 404 if course not found
Fix CourseKey error
fixup! Implementation of old-style keys as OpaqueKeys (Location and course_id)
fixup! Fix all uses of UsageKeys and CourseKeys, and all of their tests.
Merge pull request #3206 from edx/flowerhack/opaque-keys

Fix CourseKey error
fixup! Fix all uses of UsageKeys and CourseKeys, and all of their tests.
Replace tabs w/ spaces
fixup! fixup! Implementation of old-style keys as OpaqueKeys (Location and course_id)
fixup! Implementation of old-style keys as OpaqueKeys (Location and course_id)