Fix header encoding

There's an issue with stdlib's `email` module - it encodes the whole header, whereas only the name of a sender/recipient should be encoded (see paragraph *8. Examples* in http://tools.ietf.org/html/rfc2047). That resulted in wrong behavior on gmail and yahoo (haven't tested others).

This PR fixes it by encoding the email identities before they go through `email.message.Message.as_string`. It also uses `rfc822.AddressList` parser to handle identities and fix some corrupted data (instead of raising `BadHeaderError`)