Terms get deleted when their studysets are deleted since they have the studyset_id column with on delete cascade. However, we need to also make sure term images in object storage are deleted when deleting terms or whole studysets.
Also see quizfreely/idb-api-layer issue #4