Fix segfault when modeling power without thermal using TBS sampling

The periodic sampling mode was always calling SescTherm when
pwth was enabled.  This caused a segfault and was solved by
adding a check to see if thermal modeling is enabled.