Gradebook dev

After lots of manual separation, here's the code for the gradebook. 

I *think* I got all and only the code changes I wanted. I'm least confident about the changes in controllers/admin.py and controllers/ajax.py, so please pay special attention there when merging this.