Remove gsub UTF-8 to UTF8. We should check properly behavior.
Do not collapse multiple quoted-printable lines if the line encodings are not the same.

If you have multiple lines where one has an encoding of Q and the other has an encoding of B, the existing logic would collapse these lines together. This change makes it so that only lines with the same encoding are collapsed.
Correct line breaks in quoted-printable encoding.

Quoted-printable transfer encoding is intended to be "line break
neutral." It uses CRLF to encode line breaks, whether you prefer
carriage returns, line feeds, or both.

Ruby's builtin #pack and #unpack support quoted-printable encoding,
but expect to see linefeeds (\n) only. So it's our responsibility to
convert to LF before encoding and to CRLF afterward, and to convert
CRLF to LF after decoding.
Remove confusing no-op

This line previously always set the (unused) local variable body to nil.

I assume it meant to read `self.body = nil if body.nil?` however
`body.nil?` cannot happen as the previous line would crash.

Closer inspection reveals that the initialize method calls either
init_with_string or init_with_hash, both of which eventually set the
body to non-nil.
Fix inadvertently no-opped test on Ruby 1.8
Fix the bogus '=' at the end of some quoted-printable messages.

Trailing CRLF is significant in Quoted-Printable transfer encoding.
Stripping trailing whitespace corrupts the encoding, resulting in
odd '=' chars showing up at the end of decoded emails. Fixed by only
stripping leading whitespace.

Closes #440
Merge pull request #499 from ConradIrwin/remove-no-op

Remove confusing no-op
Update CHANGELOG for #499. Group pull requests by category: feature/perf/bugfix/housekeeping.
Setting the html_ or text_part to nil removes it.
Fix that declaring an html_part but no text_part would use multipart/alternative anyway.
Assigning html_ or text_part sets a default content type.

Fixes #116
Addresses without a parsable email or display name still format as their raw text.

Fixes #112
Fix that setting an attachment with a :mime_type and :encoding would override the :encoding

Fixes #123
Allow assigning arrays of Message-IDs to References and In-Reply-To. Closes #85.
Remove misleading references to fully-qualified domain names in Message-IDs
Parse multipart boundary from Content-Type headers containing extra semicolons.

Fixes #412
The Received header may contain zero name/value pairs, qmail-style

Fixes #202
Missed the compiled parser for 3a65f9ef4d81a941117f377ec1269143a3445865
Calling #to_s on a field with a nil value returns an empty string instead of nil

Fixes #194
Add MIT-LICENSE and extend copyright to 2013

Closes #190