only clone docs from gh-pages branch if they aren't there

Allow the caller of this script to decide which commit
from the gh-pages branch should be used to build the docs.
This also avoid excessive repeated git clones during development.

Change-Id: I3e58eef0ac03b15903c06d5632c0eb41413db02c
Merge "only clone docs from gh-pages branch if they aren't there"