byref begone!
Trim whitespace.
First pass at supporting HTML in BuddyPress emails.

Note - Requires my forked version of WP Better Emails at the moment until
my changes are added to the official plugin:
https://github.com/r-a-y/WP-Better-Emails/tree/changes

Currently, only supports at-mention emails and activity reply emails.

Supported HTML tags are those available in bp_activity_filter_kses():
https://buddypress.trac.wordpress.org/browser/tags/1.6.4/bp-activity/bp-activity-filters.php#L160

If we want to open this up in the future, I'll have to hook into the
activity content before save.  Right now, I'm grabbing the activity
content after save.
Format plain-text emails better.

Note - Requires my forked version of WP Better Emails at the moment until
my changes to WP Better Emails are added to the official plugin:
https://github.com/r-a-y/WP-Better-Emails/tree/changes

Since we're now using HTML content for emails, we must also do a better job
at formatting the content for plain-text emails.

I'm using a modified version of the html2text functions from the IAML
Modelling Platform (http://openiaml.org) written by Jevon Wright.

Licensed under the Eclipse Public License v1.0:
http://www.eclipse.org/legal/epl-v10.html

These functions convert <a>, <img> and <li> tags into Markdown syntax.
Make sure users who selected plain-text receive plain-text email.

This commit:

* Changes the priority of the set_wp_mail_content_type() method to run as late as possible (999), so we can hijack the content type from WP Better Emails

* Adds a new method - send_plaintext_only() - which converts HTML content over to basic Markdown before sending.  This is used only if the user has opted not to use HTML for their email.