Fixes database inconsistencies where the order by columns were not
correctly picking the id foreign keys of their respective tables. This
became an issue when executing a delete in a parent entry. For example
when deleting a project, the dependent children (Assignments, Citations,
etc) were looked up and ordered by id but the id was on the wrong table.
Also corrects 2 lines in review.py that were still using the
project_leader_id designation instead of the new leader_id.