Fix some linker error for liblua and add test codes.

N/A

Run test codes need:
1. . build/envsetup.sh
2. make
3. make liblua
4. make test
5. cp system/core/test/test.lua out/host/linux-x86/bin/
6. ./out/host/linux-x86/bin/test

Signed-off-by: liminghao <liminghao@xiaomi.com>