json_encode(): option to only encode empty arrays as objects

The JSON_FORCE_OBJECT option *always* encodes arrays as JSON objects, but there are cases in which you know the array will have only associate keys at a later stage.

I've created the JSON_FORCE_EMPTY_OBJECT to encode only empty arrays as objects. Numerically indexed arrays retain their regular [] encoding.