Introduce tsprintf(), for escaping terminal output
Summary:
Ref T8243. User-controlled strings like task and revision titles may contain terminal control codes which can make text bold and colorful when they shouldn't be at a minimum, and possibly do some worse things in some terminals.
Add tsprintf() for escaping these sorts of strings in order to show them to human viewers.
Test Plan: Added and executed unit tests.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: joshuaspence, epriestley
Maniphest Tasks: T8243
Differential Revision: https://secure.phabricator.com/D12966