Fix length -> count for some reward + payment queries

Refactor payments_successful and payments_completed into scopes
Rewrite rewards_claimed to remove n+1 query
Merge pull request #244 from Crowdtilt/fix_reward_count_length

Fix length -> count for some reward + payment queries