swap lua to use tointeger
rename to TM_TO_UINT32
Merge #637 r=@jiahuang: swap lua to use tointeger

goes with https://github.com/tessel/firmware/pull/112