Fix unicode handling, and 'filter out' the stupid 8) hipchat emoticon.

Summary:
'8)' is replaced by an emoticon of a guy with sunglasses, which totally
messes up text like '(see commit 43218)'.  We fix this by replacing 8)
with '8<zwsp>)', which looks like a normal '8)'.

While implementing this, I saw some errors related to code expecting
unicode vs utf-8.  I realized the API was unclear, so I cleaned up the
documentation and made the invariant that we use unicode internally,
converting to utf-8 when needed (which is often with these tools).

While testing, I noticed some unrelated bit-rot in the tests, which I
fixed.  The biggest was using text/text when it should have been
text/plain.  I have no idea how that happened.

Test Plan: tests/alertlib_test.py

Reviewers: alpert, chris

Reviewed By: chris

Differential Revision: http://phabricator.khanacademy.org/D14608