Properly escape CourseKeys and UsageKeys in html templates

Syntax: mako uses `${` and `<%`', django uses `{{` and `{%`. Also, this template derives from `{% extends "main_django.html" %}`, which is a django template, and others derive from `main.html` which is mako.