Improves query in review.py: `_get_next_priority` method.
Renames several database tables.
Adds ForeignKey relationships required for easier
querying.