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.

A specific use-case is when the encoded value is passed to JavaScript; if an array is passed, you can add properties to it, but when you later do `JSON.stringify()` it returns an empty array. This is quite unlike PHP of course, because arrays can be both things, depending on whether it contains only numeric keys or not.