plugins: lua: improve array detection
plugins: lua: improve array detection

di_lua_checkarray abused the return value to signal 3 different cases:

1) not an array
2) empty table
3) array

This causes some confusion which resulted in a bug where non-array
tables are treated as empty tables.

This commit makes di_lua_checkarray more readable, and fixes the
mistreatment of non-array tables.

Signed-off-by: Yuxuan Shui <7f7e1535bcd10fa942d56a3436533af20f33203f@gmail.com>

yshui/deai,yshui/deai,yshui/deai