Deleting Exam removes associations from Videos

@jbau please
* Deleting an exam will first look up all the videos which have a
  foreignkey to it, and sets all their .exam properties to None. Then it
  goes ahead with the deletion.
  (closes #2043)