Make libphutil compatible with utf8mb4
Summary:
Ref T1191. Two changes here:
- Try to use the utf8mb4 character set. Fall back to utf8 if it's not available. This may be slightly worse for old MySQL, but is far, far easier than trying to keeep a cache around somewhere with availability information.
- Prepare to transition to utf8mb4. I'm just going to switch this over in the future. I considered trying to save the migration state in the environment somewhere, but it gets really, really messy because we have to inspect the migration state in order to build a connection object. There's also no advantage in the overwhelming majority of cases. We can do something more messy here eventually if it ends up being more complicated than I think.
Test Plan: Wrote comments full of emoji locally.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T1191
Differential Revision: https://secure.phabricator.com/D10604