Multiple grant badges

(not ready for merge yet)

Missing a database-level constraint to ensure that single-grant badges are never granted more than once. Best way to do it would be to use a trigger but I didn't add it yet since I saw that Discourse does not currently use any triggers. Another way would be to add a check constraint using a function to bypass the restriction on subqueries. Thoughts @SamSaffron?