Refactor attempts and submissions.

Note we might want to combine Attempt and Solution classes at some point if that's easier to keep track of.