Simplify code and add missing unit tests

The [UT coverage for the GitHub package](http://developer.joomla.org/framework-coverage/Github.html) dropped below 100% :(

`@todo` add missing GitHub API methods for the `repositories/releases` package.