Added static_assertions and fixed exception safety in setTable
Fixed runtime error with lua 5.2