LPS-44347 SF

Hey Manu, please review the first commit with the tests. I've already reviewed the rest. /cc @shuyangzhou do you want Manu to send this to you afterwards? It changes the toString() method of PortletURLImpl and I know that's a performance sensitive method