LPS-38397 Company Thread Local fix for scheduled publishing

Re-sending of the originally liferay-portal-ee PR