This is reverting previous patch for this bug and fixes it with a different approach. The previous patch had regression, instead of freezing evolution on quit it crashed it when there was pending addressbook lookups.