Tables with index 0 should be encoded as JSON objects, not arrays. Lua arrays start at index 1, so any table with keys outside 1-N range should be treated as an object. Added IsLuaArray() helper that checks all keys are integers >= 1. Closes #348