Add endpoints to set user notification preference

These endpoints are intended to be used by AJAX calls from the web UI with an
authenticated user. When enabled, the value of the preference is a UUID that
can be included in an unsubscribe link for validation purposes.