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.
Super nitpick: if the first paragraph of the docstring is a 1-line summary, then some interactive code exploration tools can do nice summary display of function headings. Sort of like the 1-line summary at the top of git commits. For this instance you might say like:
```
"""
Replace all %%-escaped keywords with mapping funcitons from KEYWORD_FUNCTION_MAP.

Iterates over the keywords to be substituted and replaces them by calling the corresponding functions stored in KEYWORD_FUNCTION_MAP. Functions in KEYWORD_FUNCTION_MAP must return a replacement string..... 
```