Refacter to increase load speed

Prior to this commit, the website would iterate through pull_request
results twice before putting them in the graph: once in web_app.rb, and
once in the javascript in module.erb. This slowed down graph loading
considerably (*especially* on the home page).

This commit refacters the code so that the site only iterates through
the pull_request results once. It does this by formatting the data in
`web_app.rb` in one SQL query, without requiring an additional array
iteration.