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
Default value depending on platform is really useful.
For example, I have a software X who I put on a packagecloud.
As a good release manager, I created `deb` and `rpm` package for any of my clients.

But it's really bad (I think), to manage platform dependent on client. Anyone wille be oblige to do:
```ruby
packagecloud_repo 'X' do
  case node['platform_family'] do
  when "debian"
    type "deb"
  when "rhel"
    type "rpm"
  end
end
```
It's really useless as anyone have to do it, everytime.

In case someone want to install a platform indep repo, he will always set it to its value (`gem`, `pip` etc)

Moreover, attribute "default" let user override default behavior as he wants.