Set up validation_messages so that it goes through the RequireJS optimizer.
Simply check for existing text and type.
Clarify types of Python values.
Merge pull request #5881 from edx/christina/notification-requirejs

Use factory file so JS used by studio_xblock_wrapper.html goes through RequireJS Optimizer