MULE-7841: Avoid to retrieve the local host several times in order to re...

...duce build time and flakiness.
About the initialisation, I think it could be better.
About the multiple interfaces, the only difference is that all the calls to getLocalHost will return the same result which is the expected result. If there are several interfaces, the return value of this method should not change over calls, so this will still be consistent.