json-edit: Support editing arrays

When an element of the path is an integer and the parent attribute is an
array, then we just continue as expected, instead of changing the parent
attribute to a hash and overwriting things.
json-edit: Improve error reporting

We can provide the path to current attribute causing an error.
json-edit: Respect --no-clobber for parent attributes too

If a parent attribute exist, but the full path doesn't exist because the
parent attribute is not a hash or array, respect --no-clobber.
Merge pull request #2060 from vuntz/json-edit-array

Make json-edit able to edit attributes that are arrays