In which table in the database are the email messages stored?
They are stored as system variables in the {variable} table, and normally accessed with variable_get() and variable_set().  The variable names are


user_mail_cancel_confirm_body
user_mail_cancel_confirm_subject
user_mail_password_reset_body
user_mail_password_reset_subject
user_mail_register_admin_created_body
user_mail_register_admin_created_subject
user_mail_register_no_approval_required_body
user_mail_register_no_approval_required_subject
user_mail_register_pending_approval_body
user_mail_register_pending_approval_subject
user_mail_status_activated_body
user_mail_status_activated_notify
user_mail_status_activated_subject
user_mail_status_blocked_body
user_mail_status_blocked_notify
user_mail_status_blocked_subject
user_mail_status_canceled_body
user_mail_status_canceled_notify
user_mail_status_canceled_subject


Look at the code for user_admin_settings(), which is a standard system settings form and has the variable names in it, and _user_mail_text() which has all of the default text.