Make LuaRef use man thread.

Stop crashes from a transient thread creating a LuaRef, which stores a reference
to the thread.  Crash occurs when the LuaRef outlives the thread as then
is used.