Course keys use key introspection

@brianhw, @watsonemily, @srpearce, and @stroilova, please review.
Question: is there an impact on CommentThread.commentable_id for
discussion threads?
done