Fix ubjson.lua handling of untyped arrays.

Also, make parsing variable sized arrays not go into an infinite
recursion.