Page through results from Stash API.

Too many branches on our big repo matching "master" >:[

Related, hopefully someone will have a better way to do this: https://answers.atlassian.com/questions/265515/how-to-resolve-branch-name-to-sha-with-rest-api#

@robolson @cheister