Refine Assignment model and associated join tables

Implement validations and associations on Assignment, Coursework,
AssignmentRating, and LessonAssignment models.