CacheServiceTest: don't use System.gc

System.gc is too unreliable for clearing memory, sadly. Instead,
refactored to use a nasty hack (private method that allocates new
String[999999] and returns).

This hack is ONLY in test code, and I am only using it because I believe
it is necessary to make testing as consistent as possible - which this
seems to do, as I couldn't reproduce race condition failures even after
dropping the TIMEOUT to 5s (for the purposes of this commit, I'm leaving
TIMEOUT untouched).

If a better solution presents itself I would more than welcome it.