Fix cur_grade to be relative to the relevant program's start date

This should fix #1216. Also includes some other cleanup around grade and schoolyear logic.
Does this need tokens created to avoid #866?