app_lua: Added sr.xavp.get_keys function.
app_lua: add index parameter to get_keys function.
 - Remove some debug log
app_lua: manage error cases properly. We don't want memory leaks.