[FileRepo] Various ForeignApiRepo fixes.
* Avoid using FileRepo functions to stat cache files as we override/hack
fileExistsBatch(). Instead, use the FileBackend object directly.
* Adding missing prepare() call to unbreak thumbnail cache.
* Added a warning and sanity check for mwstore:// paths rather than appending them
to URLs and shipping them off to Commons. This seem to be mostly gone now though.
* Removed useless error suppression calls that were broken due to a "return" statement.
Change-Id: Ie760f09e6bfa1752544cdb60018513ffc7823496