Separate RECENT Flag to a mailbox document.

this way we avoid a bunch of writes.
refactor common pattern to utility function
Add a fetch_headers for mass-header fetch queries