LPS-37846 Extract out the logic to make a URL absolute to PortalImpl
LPS-37846 JavaScript error when accessing control panel if the first portlet needs to load implicit main.js file

Send a redirect instead of just changing the ppid within Control Panel. Otherwise the portal won't do the necessary initialization for that portlet, such as loading its CSS and JavaScript (which ended up causing LPS-37846 and probably other problems)

Make sure that the URL is absolute, since at this point the response won't be wrapped by AbsoluteRedirectResponse
LPS-37846 SF