Specify `dependent: destroy` for UserBadges.
Merge pull request #2173 from vikhyat/badge-system

Forgot to specify "dependent: destroy" for UserBadges