Only write pull request if it is a new entry

Prior to this commit, pull requests were being duplicated in the
database. Now, check to make sure the pull request isn't already
in the database before adding it to avoid duplication.
Remove calculate_averages method