maintenance: Add 'verify' action to manageForeignResources.php
* Instead of having --update and --make-sri which oddly overlap
in less-than-intuitive ways (with dry-run in there as well),
refactor with three simple modes:
- make-sri: Only validates 'integrity' attribute with remote resource
and prints it.
- verify: Extract files temporarily and compare with current /resources/lib/.
Fail if diffferent.
- update: Extract files temporarily and move to /resources/lib/.
* Abtract code for 'tar' handling in preparation for addition of
a 'file' and 'multi-file' type in later commits.
* Fix bug where tmp dir was not cleaned up by fatalError().
Change-Id: I5ca3749533496824d2c40ebb5ebe9e570da7ac8a