escape branch name as uri component in hub browse

if your branch name contains some characters that are significant to
uri's, then `hub browse` sends you to a 404 page. this change uses
`CGI.escape` to properly encode that when constructing the URL.

an example of where this is a problem is if you use topic branches named
by issues stored in an issue tracker, i.e. `fix-something-#123`
indicating what you're working on and the corresponding issue number.
fix unescaping multiple slashes in branch name in URLs
work around bug in git 1.8.2.1 in tests

Making empty commits in tests blocked by opening the default text
editor, waiting for a message which we specified to be empty.

http://thread.gmane.org/gmane.comp.version-control.git/225529
sabotage any git operation in tests that opens the text editor

This is a guard against enountering any potentially blocking commands