lib-storage: Make sure ENVELOPE parsing isn't done twice concurrently
If save_envelope=TRUE and ENVELOPE headers aren't already in cache,
header_cache_callback() starts parsing the ENVELOPE. But
imap_envelope_parse_callback() does it as well, so the envelope parsing is
done concurrently by the two callbacks.
Also once the ENVELOPE parsing is done once, make sure it's not done again
if the header is parsed again.
This didn't cause any problems so far, but it fixes the following commit to
work correctly.