Improve hardwrapping for input with newlines

Summary:
If input text has newlines, `phutil_utf8_hard_wrap` currently does not reset the wrap counter upon encountering a newline. This is consistent with `phutil_utf8_hard_wrap_html`, but inconvenient.

Instead, process it in a line-oriented way to improve this behavior. Fixes weird diffs in Phriction.

Test Plan: Diffs in Phriction look less weird now.

Reviewers: chad, kwadwon

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5423