Name Lua userdata types consistently

Change the Lua userdata types to be TYPE_*, and use a namespace on the
actual value to avoid conflicts with other modules.