set transfer encoding to base64 for dashboard html email

there is line length limit for messages in rfc 2822(section 2.1.1).
though some email systems can auto-wrap long lines perfectly, some did it poorly.
dashboard html can have very long lines(1000+ chars, e.g. when there are links
to customized searches with long queries), setting to base64 here is to make sure
it won't be cut off by buggy email systems.
Collapse the multipart/mixed if there are no attachments
Test that dashboards are base64 encoded
If decoded bodyhandles are fetched, these skipped tests pass just fine
Merge branch '4.0/encode-base64-for-dashboard-html-email' into 4.0-trunk