ExternalProject: Restore logic to not download already-existing file

The change in commit v3.1.0-rc1~85^2 (ExternalProject: Fix download
retry logic, 2014-09-13) dropped the file(DOWNLOAD) EXPECTED_HASH
argument.  This prevents file(DOWNLOAD) from skipping the download if
the output file already exists with the proper hash.  Restore this check
with explicit code in the download script.

Reported-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge topic 'ExternalProject-check-hash-before-download' into next

ee7405a6 ExternalProject: Restore logic to not download already-existing file