Fix sending multiple notifications to same registration id

When sending a notification for a particular message, send it only
once for each unique registration ID, regardless of whether the IDs
ended up being duplicated in the ``registration_ids`` field.