Update state of all submissions when done

When a user had one or more submissions whose state was not
`superseded` and that user decided to post a new submission and close
that exercise. Then the latest submissions state would correctly get
changed to `done`, whereas all the old submisssions would not have their
states updated to `superseded`. This has now been fixed and updated to
correctly change the state of old submissions.

* Add test that state of previous submission changes
* Update completion to change state of old submissions
* Update completion_test to assert that old submissions states are updated
* Remove unused variable in completion_test
Merge pull request #2017 from Adam89/update-submission-properly-when-input-needed

WIP: Add test to assert state of submission changes