Migrate unlocking feature from old autograder.

This pull requests implements the unlocking functionality from the old autograder. The `Protocol` is not yet implemented (I'll do this in a separate pull request).

Some code for the grading protocol has also been rewritten to be more consistent (including the introduction of an `OkConsole` abstract class).

This resolves #53 .
We discussed today about having subclasses of `TestCase` implement an `on_grade` and `on_unlock` interface, so that the protocol code can remain generalized. I like the idea -- I'll implement it in another PR (when I implement the stubs for the `Test` and `TestCase` objects).