Update math.lua

Added math.factorial()
Altered math.totable()