Fix 697497: Ensure array length is positive.
Fix 697497: Ensure array length is positive.

As a side effect when changing to using regular integers (and avoid the
nightmare of mixing signed and unsigned) we accidentally allowed negative
array lengths.

ccxvii/mujs,ccxvii/mujs,ccxvii/mujs,ccxvii/mujs