Make sure set_alarm is idempotent

By making sure alarms list is unique.