Implements keyword sub feature for bulk emails

This commit pulls in changes from #4487 that implement keyword
substitution for bulk emails. With these changes, an instructor can
include keywords in their bulk emails which will be automatically substituted
with the corresponding value for the recipient of the email. Keywords are
of the form %%keyword%%, and the keywords implemented in this commit include:

%%USER_ID$$ => anonymous_user_id
%%USER_FULLNAME%% => user profile name
%%COURSE_DISPLAY_NAME%% => display name of the course
%%COURSE_END_DATE%% => end date of the course

Client-side validations have also been implemented to ensure that only emails
with well-formed keywords can be sent.
The architecture is designed such that adding in new keywords in the future
would be relatively straight-forward.
I just had a thought that I apologize for not thinking of sooner:
It would be very nice if the for loop below was pulled out into a separate method that took a User and CourseModule, that this method called. This would be cool because the inner method would be much more efficient for callers who are processing a lot of users or courses in a batch. If I'm not making much sense let's talk about this in person. 

This may be out of scope, but it might be interesting if we could tell the difference between user_id objects and User objects, and between course_id objects and Course objects.