Extract email

Start to extract email related functionality from user.js into two email types - primary and secondary. A common email super type exists to handle common bits.