Fixed script, question, and comments relationships

Previous commits for merging the script, question, and comments
models with entry model left a bug where for example a course
is delete, its questions will be deleted but the scripts and comments
below them will not. Sometimes the question is deleted, but the related
entry will not. This has now been fixed by modifying the relationships
among them.