Extracted DefaultBinaryStore (with rename) class. Cherry picked from commit 7e7019a
Added some coverage for binary store implementation. Cherry picked from commit 849784d
Some refactorings in the binary store implementation. Cherry picked from commit 48d3ec2
Tightened coverage for the binary store implementation. Cherry picked from commit fc4d787.
Removed dead method. Cherry picked from commit 67c09c9
Fixed a problem with close method of the binary store
(cherry picked from commit 1c4360b)
Checkstyle
(cherry picked from commit 243353a)
REVIEW-2957 Used CompositeStoppable
(cherry picked from commit ffd0985)
Small refactoring, lazily create the caches.
(cherry picked from commit 853fa39)
Removed thread safety logic. It was incomplete and it's not needed for now.
(cherry picked from commit 6328b0c)
Added some unit coverage.
(cherry picked from commit 6f4ccc1)
Fixed problem with DefaultBinaryStore. Cherry picked from commit b1dd0d3 (only the coverage).
Removed unnecessary code
(cherry picked from commit 633c25c)
Fixed the problem with the byte offset not working for large files that contain the resolution result.

1. Max int was getting in the way. We could use long instead of int but it wouldn't scale and it was inconvenient because skipping bytes works on ints.
2. Now the resolution result binary files are rolled at a reasonable levels. There's also a safety check in the code that errors out early if we ever hit this problem again.

(cherry picked from commit ef1a306)
Merge branch 'release'

Conflicts:
	subprojects/core-impl/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/DefaultDependencyResolver.java
	subprojects/core-impl/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/store/DefaultBinaryStore.java