Accounting optimizations

Includes three optimizations to the accounting module that drastically improve performance:

- Caches the sibling_discount and the list of students receiving a student discount, and skips sibling discount calculations if sibling discounts are not enabled for the program.

- Uses joins instead of subqueries.

- Limits accounting to registered students.