DO NOT MERGE - GitHub Refactoring Preview PR

*DO NOT MERGE THIS PR!*

This is a preview of a work in progress that refactors most of the GitHub integration into a modular and consistent structure.

Notice the new directory `app/coderwall` this is the new home for all code that is not strictly coupled to the Rails infrastructure. Inside the directory you'll find the `Coderwall` namespace which is to be considered the root of all application specific code. Inside the directory there's the `app/coderwall/git_hub` directory which contains all the new implementation and current refactoring of our GitHub integration under the namespace `Coderwall::GitHub`.

`Coderwall::GitHub` is intentionally cased with a capital H because (that's how GitHub is spelled) and to differentiate and avoid collision with existing `Github` models. Eventually this will be reconciled. `Coderwall::GitHub` currently primarily exists to host the `Coderwall::GitHub::Queries` namespace with has queries divided between `Coderwall::GitHub::Queries::Repo` for repo specific queries and `Coderwall::GitHub::Queries::GitHubUser` for GitHub user specific queries. 

All the queries follow the same pattern and inherit from a shared `Queries::Base` class.

```
# client = Coderwall::GitHub::Client.new(ENV['GITHUB_ACCESS_TOKEN']).client
# or
client = Coderwall::GitHub::Client.instance # picks up the env token automatically
contributors = Coderwall::GitHub::Queries::Repo::ContributorsFor.new(client, 'assemblymade', 'coderwall').fetch
# => array of hashes representing the response from GitHub
```

My reason for doing this was that working inside the existing codebase has been very difficult to clear out old pieces of legacy code, get them under test, and clear out the cruft. Much of this is existing logic that has been pulled out then refactored for consistency and maintainability. The tests are passing but there are still aspects of the existing app that use this code that are not themselves under test. I'm working to clear this up and finish the integration as soon as possible then start looking at moving other pieces of the application to refactor under the `Coderwall` namespace.

Thanks.
Mike
I believe this method can be improved in several ways:

1. Whether the repository is owned by an organization or not, the information should reside into `GitHub::Repository`. Is there any particular reason why you kept such information in this class?
2. I might be wrong but I can smell **Feature Envy**: it seems like this object deals mostly with `Repository`; maybe you could create a `Repository#metadata` that behaves like this, more or less:

  ```ruby
   # somewhere inside Repository...
  def metadata
  {
    languages:    languages_that_meet_threshold,
    original:     original?,
    times_forked: forks ? repo.forks.size : 0,
    watchers:     followers.collect(&:login)
  }
  end
  ```
You could even move the whole function to `Repository`, and simply call it `to_fact`: it would resemble the classics `to_i` or `to_f` by the Ruby standard library. I am not sure about this, though, since it would mean that `Repository` will be responsible of building facts. However, one benefit could be changing the `calculate` method to something like the following:

  ```ruby
  def calculate
    foo = GithubRepo.where('owner.github_id' => user.github_id).all.where(&:has_contents?).map(&:to_fact)
    bar = GithubRepo.where(
      'contributors.github_id' => user.github_id,
      'owner.github_id' => { '$in' => u.orgs.map(&:github_id) }
    ).all.where { |repo| repo.original? && repo.significant_contributions?(user.github_id) }
    .map(&:to_fact)

    qux = Fact.append!(
      "github:#{login}",
      "github:#{login}",
      'Joined GitHub',
      user.github_profile.created_at,
      "https://github.com/#{login}",
      %w(github account-created)
    )

    (foo + bar + qux)
  end
  ```
  Please note that by naming the variables appropriately (e.g. `foo`, `bar`), the previous snippet would improve significantly.