Validate contact emails before adding

Also updates the DB to filter out existing invalid contacts.

Closes: bgo #713932