Refactored License dialog handling in ProductLicense

- bnc#886662 : Aborting the installation
- the change is actually not "needed", but I've refactored that piece of code when debugging "aborting in the installation" and it makes the code more understandable ... and it has a test
Since you are here, maybe you could kill that Builtins.tostring (specially since you have already checked that ret is a string).