case-insensitive, more error reporting, flattenlist

1. Made lua case-insensitive using lua metatable (basescript.lua)
2. Added error reporting mechanism on LuaParseTrigger : Trigger now
accepts triggers
3. Added FlattenList function