Support depending on branches of git repos.

To do this we fetch all remote branches when cloning, which probably isn't the
best thing to do. Instead it'd be better to fetch the minimum we need to list
remote tags and branches, and then pull a specific remote tag or branch into
the final installation dir.