GRADLE-3219 - cache the location of the local Maven repo

In order to determine the local repository location, user's settings.xml file
is read. There's no need to do this every time an instance of the repository
is created. In multi-project builds this happens at least once per project.
@alkemist 
Actually doesn't have to be synchronized - in the worst case the repository is going to be determined twice. But then will have to make `localMavenRepository` an `AtomicReference`... I think I prefer to keep the `synchronized` - this is _not_ really a hot-spot.