incomplete rebase of 350-install-github to current master

original: 9f8284068812f89
move code around
add test
install latest release using user/repo@*release instead of user/repo@*
final amendments
correct implementation of github_resolve_ref.github_release
test github_resolve_ref using a mock for github_GET
Merge remote-tracking branch 'hadley/master' into 350-github-releases
merge documentation for github_pull and github_release
Merge pull request #475 from krlmlr/350-github-releases

Allow installing the latest GitHub release. Closes #350.