Revert "Revert "Redmine#6063: add 0-9 A-Z _ to allowed context of module protocol""

This reverts commit 09e23322db65e315834e3c13a82f31bc977fb2e7.
Redmine#6063: refine allowed context of module protocol and test with a regex
Redmine#6063: move context regex out of the code block and rename the variable helpfully
Merge pull request #1750 from tzz/bugfix/redmine6063-context-names

Redmine#6063: Context name validation is too strict