Add uniqueness constraint to memberships table

* Since we may (and do) have duplicate memberships, we must first remove
  these duplicates. SQL to the rescue!

[Closes #13]