folly::json: allow skipping invalid UTF8
Summary:
folly::json::serialize by default doesn't check for valid UTF8, and as a result can generate invalid JSON. There is an option to check for valid UTF8, which throws on an error.
This diff introduces a new option, `skip_invalid`, which replaces invalid chars with U+FFFD. http://en.wikipedia.org/wiki/Specials_(Unicode_block) seems to suggest that this is the correct replacement.
@override-unit-failures
Test Plan: g-unittest
Reviewed By: delong.j@fb.com
FB internal diff:
D1102923