Remove a bit of repetition and casting in PackFileTest

PackFileTest lives in o.e.j.internal.storage.file, so I think it's OK for
it to acknowledge the existence of FileRepository in order to avoid some
unnecessary casting, and probably nicer to avoid the repetition too.

Change-Id: I0de592a32f6178e6d6bf114848101e185b3111a1
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
Decommission RepositoryBuilder

It's only used for creating FileRepository objects, which
is FileRepositoryBuilder's job...

Change-Id: I99d7bf0a8af29f4f93c5d85e4bd4d25c22c1d604
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
Allow non-static WindowCaches (scoped to repo ObjectDirectory)

Each repository can now optionally have it's own WindowCache, with
independent config separate from the default WindowCache - permitting
concurrent usage of JGit repos with, for instance, different
streamFileThresholds (useful for testing). Some discussion on the JGit
mailing list:

http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02532.html

Although this commit changes and moves quite a few fields and methods to
achieve it's goal, all breaking changes are within the
org.eclipse.jgit.internal.storage.file package - and 'internal' means
it's API may be modified between releases if necessary, see:

http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02145.html

Summary of changes:

* WindowCache now offers primarily instance-based methods, and the
  'default' cache is no longer a static field but instead referenced by a
  static AtomicReference, which can have it's value updated as necessary
  (ie EGit can change what the ref points at to change the cache and all
  impacted repos will change to match at the same time).
* ObjectDirectory now holds an atomic-reference to it's current WindowCache
  instance.
* FileRepositoryBuilder now allows the caller to specify WindowCacheConfig,
  which can be used to create an independent WindowCache for the generated
  FileRepository. If not specified, the default WindowCache ref is used.
* FileRepository now specifically takes a FileRepositoryBuilder (rather
  than just a BaseRepositoryBuilder) in it's constructor, because it needs
  to pass the specific WindowCache field along to it's ObjectDirectory.
* PackFile has a new 'getWindow()' method, which assumes responsibility
  (previously held by the now-removed static WindowCache.get() method)
  for handling cache-changes during window loading.

NB: This change only affects WindowCache, DeltaBaseCache remains
statically-configured.

Change-Id: Ibf2ef604bac08885b2b3bd85f0dc31995132b682
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>