core: move email domain functions from z_email_server to z_email and make them available to other routines.