Message backup

This PR makes all of the messages persistent so every message gets sent (unless that particular run was run with --local). In addition, it collects information on the grading and unlock protocols so that the server can display progress bars and stuff to the end user.

@sharadmv - maybe take a look at this to see what's going on.

Also, don't merge this yet- I want to test it with trends to make sure that nothing breaks. I'll let you know when everything's good.
This probably means that the server is down or something. I was mainly copying what was in main().