Checkout ExtensionIndex branch associated with either 'Nightly' or a release

This commit teaches 'cloneRepository()' a new 'branch' parameter
and introduces function 'checkoutBranch()'
Fix naming "ExtensionIndex" -> "ExtensionsIndex"
Tweak checkoutBranch() to reset local branch to match origin/<branch>