Refactor

- use an helper
- use yum cookbook
- use URI to create url
- Fix problem with "name" resource != new_resource.name
- Add a default value for `type`

Based on #2
There are two problems with switching this to `yum_repository`:

- `yum_repository` pulls in additional dependencies -- we switched away to managing the files directly to reduce the number of dependencies the cookbook had
- more importantly, `yum_repository` does not have a `repo_gpgcheck` option, so yum will not check the repository metadata GPG signature that packagecloud.io generates, which is not ideal. (this option is not the same as `gpgcheck` -- `gpgcheck` checks the GPG signature of the package itself, `repo_gpgcheck` checks the signature of the repository metadata).