FormatJson: Remove whitespace from empty arrays and objects

As noted in c370ad21d7f8, the pretty output can differ between
Zend PHP and HHVM. This change adds some post-processing to make
the output consistent across implementations and with JavaScript
JSON.stringify() and Python json.dumps(); all whitespace between
the opening and closing brackets/braces is removed.

Change-Id: I490e0ff1fac3d6c3fb44ab127e432872c0301a9d
(cherry picked from commit b6a5bb484d90c6705bd1b010efcc2c1c18be1f34)
Merge "FormatJson: Remove whitespace from empty arrays and objects" into REL1_22