Refactor code to create LocalFolder instances from a database query.
Don't load unread/flagged count when creating LocalFolder instances

This avoids a potentially expensive LEFT JOIN when querying the database.