Fix #66021 (Blank line inside empty array/object)

Changed json_encode() so that when the JSON_PRETTY_PRINT option is specified,
the pair of linefeeds immediately after an opening bracket and before the
corresponding closing bracket is omitted when the array or object contains no
elements or accessible properties (and hence would have a blank line between
the brackets).
Merge branch 'pull-request/518' into PHP-5.4

* pull-request/518:
  Fix #66021 (Blank line inside empty array/object)
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Fix #66021 (Blank line inside empty array/object)
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fix #66021 (Blank line inside empty array/object)