Fix duplicate emails & Add mandatory email validation

This pull request mainly does two major things:

1. Fix all possibilities to introduce duplicate emails
2. Add instance option to force mandatory email validation

Additionally, some smaller related issues (Email validation, OpenID issues) are tackled on the go.

For all details, have a look at the individual commit messages, which are separated cleanly.