Check for badges duplicates

This patch makes data model throw an error when
there are duplicates of badges.

Change-Id: I3004dd053628c8ad5a06011fc3953c17b0825d82