fdo#78536: sfx2: template dialog: make the am-i-dead-yet check reentrant

In the fine tradition of our enterprise-grade code base, this lets the
check in SfxCommonTemplateDialog_Impl::Execute_Impl() do an early
return if the "this" instance has signalled its untimely demise even if
there are multiple calls of Execute_Impl() on the stack; extending
the scheme with further epicycles to make it work if the Execute_Impl()
calls happen on 2 different threads is left as an exercise for the
interested reader.

(regression from bcc52fb2ebdf77a1cc089857775fd742085b45b6)

(cherry picked from commit 838c580fdba8b1c72bc854d101d302be0e3861d5)

Conflicts:
	sfx2/source/dialog/templdlg.cxx

Change-Id: I1d9f0d82bf6d9f5da8f9bd2be57d01937d71fd26
Reviewed-on: https://gerrit.libreoffice.org/9406
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>