Auto merge of #1370 - ageis:improve-fetch-params, r=daira
Auto merge of #1370 - ageis:improve-fetch-params, r=daira

Improvements to fetch-params.sh

Two instances of the fetch-params.sh script running at once will result in corruption of the proving key and an error when the hashes are computed. This implements a lock to stop such a scenario from occurring.

We also terminate and don't create the symlinks if the downloaded parameters fail the checksum command.

Fixes #1306. This is the same as #1310 but now targeting master.

bitcoinsSG/zcash,bitcoinsSG/zcash,bitcoinsSG/zcash,bitcoinsSG/zcash,bitcoinsSG/zcash,bitcoinsSG/zcash