Create a method with associated data in our Lua object, too.

This is like a captured variable on closures/blocks/lambdas, and can be used to hand C++ objects into our C function that Lua calls. It's a bad idea to give map scripts direct access to the network connection like "write" currently does. We will restrict the commands and sanitize their parameters.