gtlua: take care of double->integer conversions

Closes #313.
add some more type fixes
Merge pull request #316 from satta/lua_doubles

Type conversion fixes.