Fix flag lookup in email view
Reduced number of queries on home page

Previously it was the number of inboxes on the page + 4, now it's just 5 :)