Only set state to pending when last is deleted

If a user deletes a submission that's not the last one, the prior one gets a
`pending` state. This caused two submissions for the same exercise to appear
on the current_exercises list. This commit fixes this by making sure that the
submission getting deleted is the last one and then setting the state of the
prior one to `pending`.
Clean up ExercismWeb::Routes::Teams
Merge pull request #1831 from michalmuskala/teams-refactoring

Clean up ExercismWeb::Routes::Teams
Address duplicate team member bug. Fixes #1742.

Fixes duplicate recruits test and adds scoped uniqueness validation to
TeamMembership. Also adds guard to Team#recruit to remove existing
members from invitees. Performs this same subtraction when sending out
notifications in routes/teams.
Refactor solution to check submissions state

Add test to make sure that the solution changes a submissions state when the
necessary conditions are met. Add test to make sure solution does not change a
submissions state when the conditions are not met.
Refactor solution to check a submissions state as opposed to check if its the
last submission.
Add welcome page
Merge pull request #1846 from tbloncar/tb-team-twice

Address duplicate team member bug. Fixes #1742.
Tweak homepage
Merge pull request #1830 from Adam89/ma-delete-submission-bug

Only set state to pending when last is deleted