Fixed InvalidKeyError in course handler in studio.

LMS-11141

Implemented try except on ```CourseKey.from_string()``` in course handler to fix ```InvalidKeyError```.

Added test for invalid ```course_key_string```.
I mean I do not understand the purpose of `('application/json' in http_accept and request.method != 'POST')`.