Move some code to new StudentRegSanityController

There were some functions in the lottery assignment controller that didn't
have much to do with the lottery but were stil useful.  I moved them into
a new controller that can be used similarly to the lottery (instantiate
with a program and any options, then call sanitize()).  I also made the
minor tweaks so the code would run.
Fix indentation in Class*.getRegistrations()
Add a check for the lottery module in LotteryAssignmentController init
Add utility calculations to lottery

This code will need to be updated when support for multiple priority
levels is merged in.

The utility arrays are needed for the "screwed sweep" spreadsheet
generator that is about to be updated.
Minor fixes to lottery code (mainly screwed sweep)

Indentation, importing the right thing, adding missing parentheses, etc.