BUG: fix crash when editing scripted screen shots

Fixed the default screen shot type to use the defined full layout
integer.
Added checks to avoid crashes for scripts that are in extensions.

The default screen shot type was set to -1 in the python scripts
and templates, but in the Qt widget, the screen shot type was
only defined from 0-4. Trying to open the scripted screen shot
node in the Qt widget would cause a crash since the -1 type was
cast to the enumerated WidgetType in qMRMLScreenShotDialog
resulting in an invalid number and a null widget.

Issue #3879

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23763 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: get the screenshot type without making a widget

From JC: avoid creation an instance of the widget to get the
value of the enum

Issue #3879

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23764 3bd1e089-480b-0410-8dfb-8563597acbee