Support the branch option for cc.xml requests.

Fixes travis-ci/travis-ci#2090
Make master a string.
Delete TODO.
Skip including a build if it doesn't exist.

This catches branch specifications where no build is available.
Fetch last build if no branch specified.

This restores backwards compatibility with the current behaviour
rather than defaulting to master. Though the latter would probably
the right thing to do in the longer term.
Fix ERb line.
Fix typo.
Fix variable name.
Fix another variable.
Ignore vendor.