Rebased dreb's commit to update sizes dictionary

for faster calculation of sizes.
https://github.com/andrejb/leap_mail/commit/8b88e85fab3c2b75da16b16c8d492c001b8076c6