DRY up user.rb.
Merge pull request #1530 from Gaelan/dry-users

DRY up user.rb.
DRY up streaks.
DRY up GitHub code.
DRY up cohorts.
DRY exercises API.
DRY snapshots.