Rename template object variable

The fix in b6efaa8ef removed caching and loaded a template
object, but the variable name $template used for the object
overwrote the initial $template variable which had the
template id/name. Rename to $template_obj.
Merge branch '4.2/crontool-template-obj' into 4.2-trunk