Ensure the source repo in the cache is in a clean state before building
Summary:
This ensures the script can easily recover from common failures, such
as an incomplete cherry-pick, which leaves the git repo in a bad state and prevents
further pulling of latest changes.
Test Plan:
Edit some files in the cache.
fetch_documentation.sh
The script should complete rather than fail.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7784