Calling TemplateObj on a ScripAction is deprecated

Unfortunately, the fallthrough code which should make this a deprecation
warning, but still return an RT::Template object fails and returns
undef.  This does not fix it to be back-compat but instead just switches
to what I believe to be the correct code going forward.

Discovered when PreviewScripMessages was turned on (defaults off) as
reported in #26983
Fix ->TemplateObj to be back-compatible

Returning undef is only appropriate if we cannot determine the
TemplateObj, which is only the case if we have stored neither
TemplateObj nor Template.  In most cases, TemplateObj was stored on the
object when ->LoadAction was called.
Merge branch '4.2/previewscripmessages-regression' into 4.2-trunk