Added a new Output interface for writing to logs. Exposed an Output:write() method to Lua, and replaced calls to Lua print() with Output:write().