GRADLE-3107 : Don't re-check repository for missing module every 24 hours

- If no other repository has the module (prefer to search than fail)
- When run with —refresh-dependencies

Inspired by https://github.com/gradle/gradle/pull/298
Code formatting