Fixes submodules to track branches so that we don't get detached HEADs.

The default submodules do not track the branch, only commits, so that detached HEADs are common when using git submodules.  This helps to prevent that behaviour.  See e.g. [here](http://stackoverflow.com/questions/1777854/git-submodules-specify-a-branch-tag/18799234#18799234).