Implement workaround for latest versions of the json gem

Implements second workaround from https://github.com/flori/json/issues/179
so that json module doesn't have to be monkey patched.

Hopefully https://github.com/flori/json/pull/182 will be accepted and a
more efficient solution may be implemented
bump version to 0.16.4
handle arrays in new json parsing mechanism, bump version to 0.16.5
follow on fix to json-array handling to handle nested arrays, bump version to 0.16.6