Fix JENKINS-22610

Added check if the returned value from getTemplateById is null. Write
error to the build log if the template is missing.
Switch to using localized message
Add test for JENKINS-22610
Merge branch 'master' of github.com:jenkinsci/email-ext-template-plugin