[FileRepo] Added support for temp file repos (to preserve our thumb.php hack).
* Added FileRepo::getTempRepo() to get a temporary repo similiar to the one used in wmf1.19 thumb.php.
* Merged and cleaned up wmf1.19 code into thumb.php to handle temp files and thumbnails.
Change 1: prevent FileRepo::getTempRepo() from being called on the result of FileRepo::getTempRepo().
Change 2: made FileRepo::getTempRepo() account for cases when the 'directory' param is not the empty string.
Change 3:
* Tweaked TempFileRepo to override getTempRepo() to enforce restriction.
* Added FileRepo::getTempHashPath() and used in thumb.php to get the correct path.
Change-Id: I2937b5ffb3ec9a7e2741b42bc28dc76833053fcd