Add internal duk_set_length() call
Fix JSON.parse() array 'length' property

Previous change to use duk_def_prop_xxx() instead of duk_prop_put_xxx()
broke 'length' of parsed result arrays.  Since duk_def_prop_xxx() don't
automatically update 'length', it was left unset.
Change asserts to checks in duk_def_prop_xxx()

Some limitations of duk_hobject_define_property_internal() (which is
ultimately called by duk_def_prop_xxx()) are not obvious and were only
asserted for.  Change the asserts into actual checks so that if there
is a call site which makes an incorrect assumption (perhaps in some
corner case), an error is thrown instead of something unsafe happening.
Merge branch 'def-prop-checks'