Fix a perf bug with TreeBlobModifier - was re-cleaning TreeBlobEntrys

Required a chunk of refactor: the introduction of ThreadLocals for
non-threadsafe repo resources, which will probably have /some/ kind
of effect on performance in itself (from the figures below, negligible,
possibly a little beneficial).

However the real benefit is just that the memoisation of TreeBlobEntrys
actually works now, resulting in much better performance for
'--replace-text' operations.

Simple file deletion (ie checking ThreadLocal performance)
====================

$ time java -jar bfg-traditional.jar -D pushgems.rb
BFG run is complete!
real	0m24.823s
user	0m49.388s
sys	0m8.680s

$ time java -jar bfg-threadlocal.jar -D pushgems.rb
BFG run is complete!
real	0m24.218s
user	0m48.980s
sys	0m8.540s


Blob modification (ie testing the TreeBlobEntry memoisation).
=================


change-stuff.txt:
---
require==>demand
---

$ time java -jar bfg-traditional.jar --replace-text change-stuff.txt -fi *.rb
BFG run is complete!
real	5m31.974s
user	18m27.652s
sys	0m52.532s


$ time java -jar bfg-threadlocal.jar --replace-text change-stuff.txt -fi *.rb
BFG run is complete!
real	1m43.657s
user	3m5.532s
sys	0m39.468s