LPS-40039 getLayout calls during portlet import fail due to null service...

... context. Consolidating service context thread local usage - adding check for layout and portlet export and import (pattern from LayoutExporter)