Update open in nbviewer to parse GitHub URLs

Bookmarklet, chrome extension, and Firefox extension are updated to
parse GitHub .ipynb URLs without having to go to the raw view.

Also some organizational changes to make the code a bit cleaner, such
as storing the regexs in variables.

Many thanks to David Sanders (@dpsanders) for this idea and for figuring
out the regex logic for this.