Cleanup & project automation

Some basic Django hygiene and automation, along with some code cleanup. Best viewed with whitespace diffs suppressed, and best reviewed commit-by-commit.

Nice start, @bdyn!
For your own sanity, it's best to keep invalid data out of the database entirely - things will be completely unmanageable if you always have to check whether games are legal. Instead, just blow up if someone tries to save a game like that.